ZotFile - Advanced PDF management for Zotero

1679111263
  • I would like to rename all attachments following the Zotero convention, but exclude items for which any of the following conditions are true:
    -There are multiple attachments of the same type. (E.g. two attached PDF files)
    -The filename already follows the Zotero convention

    Can Zotfile support this use case? I have two libraries with 3000 and 5000 items each. Does the library size cause a problem?
  • edited September 1, 2011
    I'm not finding zotfile 1.6.4 at your link -- that page goes only up to 1.6.3, which is not compatible with standalone. Do you have a version of the 1.6.4 xpi that we could download directly? (Or do we need to be patient?)
  • I have same issue as @Hecksher I think....

    Despite reading "For Zotero Standalone, first download the 1.6.4 extension file from here" (at http://www.columbia.edu/~jpl2136/zotfile.html#install)

    there is no 1.6.4 under that link.

    So, no Standalone compat.

    Staying patient....

    --Malcolm
  • mmmh, I am almost sure that the version was there... Anyways, I uploaded it again:

    https://addons.mozilla.org/en-US/firefox/addon/zotfile/versions/

    Let me know if it disappears. Then I will upload the xpi file somewhere else until the problem with Mozilla gets fixed.


    @mronkko: No, zotfile does not support that case. 1) is the problem because there currently is no way to exclude these files from the renaming process (2 shouldn't matter, I think). Do you link or import attachments? Imported attachments can have the same name and zotfile adds 2,3,4... for linked attachments to the end of the file names.
    You can give it a try yourself. Shouldn't be a big deal considering that you know the zotero api from your own plugin and I am willing to help. Otherwise, I can make a small modification but that might take a while. In theory, 3000-5000 items shouldn't be problem. I just haven't tried it and only remember one report here on the forum from someone who renamed such a large library. I would back-up before you try though. And let me know whether everything worked out in any case.
  • I import attachments. I am worried about unnecessary renames because this one of these two libraries is a group library and unnecessary renaming adds the size of the data that needs to be synced.

    In my case, if there are two attachements of the same type, these are practically always scanned books. One chapter in one file, and the files are named based on the chapter title. I would not like to rename these.

    I will probably take a look at this some time in the future and then post the results here.
  • Joscha, still can't see it. Didn't you say that Mozilla was still approving it? But seems like a long time for that to take. I'd appreciate another location in the meantime!
    I'm chomping at the bit to try it out, as this looks like it will solve my frustrations with having all my files buried in some far-away "storage" folder with endless subfolders.
    Joel
  • It's there for sure (at least right now)... I see it and just tried at another computer... Maybe the site is cached on your computer...
    (my ftp client is making problems right but i will try to provide another link later)
  • @Joshca - agreed - it is there NOW (not before). And installs fine on latest Standalone. Thanks!
    ~Malcolm
  • Found the 1.6.4 version -- thanks for your usual but remarkable responsiveness!
  • edited September 5, 2011
    @mronkko: Skipping items with two or more attachments is actually super easy. You just have to change one line in the 'getSelectedAttachments' function (in zotfile.js).
    Change
    for (var j=0; j < attachments.length; j++) attIDs.push(attachments[j]);
    to
    if(attachments.length==1) attIDs.push(attachments[0]);
    You can make further changes for your 'attachments of the same type' criteria. But maybe this is already sufficient. I haven't tried it but it should work.
  • Hi Joscha,
    I've just copied this post across from the zotero forums:
    I tried the experimental but extremely useful duplicates removal option [extensions.zotero.debugShowDuplicates] and zotfile stopped working. When I clicked on "change name" or "push to reader", nothing happened.
    This resolved when I stopped using the duplicate option. Not a big problem, but I thought you might like to know :)

    Thanks very much for creating zotfile - a brilliant add-on! I use it every day.

    Could I also drop in a couple of feature requests?
    1. I always rename attachments (in my case pdf files from pubmed etc) and the push them to the reader folder. It would be great if there was a one-click option to do both tasks
    2. To be even lazier, I'd like all imported pdf files to be automatically renamed and sent to the reader, no questions asked. I know this won't be popular with everyone, but it would be good to have an option like this.

    Thanks again!
  • sidies - note that Zotero now has a fully working and enabled duplicate detection (and merge!) feature in the 3.0b - I thought I remember people saying that Zotfile worked with the beta, but someone would have to confirm.
  • @sidies: zotfile works with Zotero 3.0b, I am using it myself... the duplicates detection also works fine with it (in 3.0, the 'debugShowDuplicates' preference was removed). So it seems to be only a problem with the trial implementation in earlier Zotero versions. I won't bother looking into it if it doesn't show up in 3.0.

    feature requests: Actually, I always intended zotfile reader to rename attachments when they are moved to the reader. So it's kind of a bug and I fixed it in zotfile 2.0, which provides a preference for renaming attachments when they are moved to the tablet. It's still a testing version but there are a lot of new features and other bugs from zotfile reader got fixed. You can get the version here and I would be happy to hear whether everything works:

    http://forums.zotero.org/discussion/18737/2/zotfile-reader-zotero-plugin-to-work-with-tablet-ipad-android-tablets-etc/#Comment_104000

    2) This would require a second expandable menu to provide all the subfolder options, which I think is getting to messy...
  • I want to reiterate my request to have an option to copy my PDFs. I don't want to move them out of the Zotero setting; I just want a directory with a copy of the PDFs so I can download them all to my ereader. I understand the reasons why one would not want to copy but I want to be able to copy PDFS from hundreds of citations in one action. Currently zotfile moves them which isn't what I want -- I want Zotero to remain as is and just to have the option to have a copy (could be a check box).

    Is that possible? I'd really use this a lot if I could use it to copy my PDFs, not move them. Thanks!
  • @zeynep: well, that's essentially what zotfile reader and now the zotfile 2.0beta is doing (I would go for the 2.0beta). Or am I missing something? You can also batch move all your attachments...
  • Could you send me the file / project to be compiled in Linux? Will give it a try on the weekend :)
  • @mat-in: Great! I have put all the stuff with some instructions in the zip file below. You should start with the 'read-me.txt' file. My compiling knowledge is very limited but let me know if you have questions or need some other files.

    http://www.columbia.edu/~jpl2136/PDFTools/code.zip
  • edited October 15, 2011
    Hi Joscha,

    A really great plug-in, first of all. I have been trying to format renaming pattern and run into a problem. Is there a way to make something optional? In Zotero renaming patterns { } are used with the intention to include only if this field is not empty. Is there anything like that in Zotfile? The problem is when I add %v and there is no volume number for certain publications, I end up having two spaces in the file name.
  • @romanov-umich: That's currently not possible. I agree that it should though and I will add this option. Might take a while though. Meanwhile you could use the Zotero renaming rules but they don't allow you to use the volume...
  • @Joscha: I sort of found the way around - not perfect, but the best at the moment. I use the following pattern for renaming, which allows me to avoid double spaces (%a - %t %v(%y)). Would you consider adding the deletion of possible double spaces before applying the name to a file?
  • Joscha: Having been using and loving zotfile everyday. Running zotero 3.0b2 and just un- and reinstalled zofile. Can't fix the following: Scan reader no longer works. Click on it and nothing happens. When I do "remove" from reader it does catch updates then and renders them correctly from PC. Does not do this however if I post them to the reader using the folder hierarchy option. Then when "removing" annotations not captured. (I don't really care much about latter problem but thought it might help diagnostically).

    Again, thanks for all your great work. I very much appreciate it.

    -Jeff
  • @Jeff: Someone else reported problems with the scan reader function on windows. I will look into it but it probably is going to take some time. To help me pinpoint the bug, can you be very specific on what you are doing? Something like 1) Move file to reader, 2) Annotate file on reader (unless you are using the 'foreground' mode, make sure that you are changing the file in the the reader folder and NOT the zotero attachment file - a mistake a made a couple of times during debugging). 3) ...
    Are you running zotfile 2.0beta3 on Windows? Foreground or background mode (if that doesn't tell you anything it's most likely background)?
  • Joscha,

    Thanks for the great work you have done with ZotFile. I've been using it for a while (often in combination with zotfile reader) and I have a couple of suggestions to improve the addon:

    1)would it be possible that when ZotFile renames pdfs that it could automatically remove all the accents and other strange characters often found in authors' names? strange accents in the filenames keep giving me an "unicoding error" when I move them to dropbox
    2) would it be possible to rename the file with even more options? and here I am thinking about renaming files with "Last Name, First Name," (or even "Last Name, Initial of First Name") since quite a few of my references share very common last names...
    3) would it be possible to customize what replaces the ":" or "."?

    Again, thank you for all the great work you have done with ZotFile, and I hope this helps.

    Best,

    Sergio
  • I agree with Sergio. These improvements will be very helpful. As to the first one of the suggested. I have recently discussed that issue in regard to BibTeX translator (for more details: http://forums.zotero.org/discussion/20316/zotero-bibtex-transliteration-of-arabic/). According to adamsmith, this functionality is included in the utilities.js file in Zotero, you just need to enable it (I do not know how though), or you can incorporate this script (http://lehelk.com/2011/05/06/script-to-remove-diacritics/) into you add-on. Thanks for you add-on, btw, it is indeed great.
  • @sergiomf & romanov-umich: I have put your suggestions on my list. I will most likely implement the first point, probably the second too but I am not sure yet about the third. Note that all updates will take some time because I am pretty tied up with other things right now...
  • edited November 8, 2011
    Scan Tablet works for me on Windows XP on multiple computers, by the way. The Zotfile 2.0beta works really well. Some comments though:

    1.
    Now that Zotfile works on multiple systems, one thing that wasn't immediately obvious is that you have to manually configure the subfolders on every system on which you install Zotfile. If there would be a way for Zotfile to read in a custom folder structure that would be great. Conceivably, this might involve a check whether the selected folder is empty or not (and when not, replicate the folder structure in the Zotfile preferences on the basis of the existing folders). Or perhaps you would be able to piggyback on the Zotero sync to transfer that information.

    2.
    Some comments about the wording in the Scan Tablet dialog:
    Attachment X was modified. What do you want to do?
    A. Remove attachment from reader
    B. Cancel
    C. Update Zotero File
    Suggested changes in wording:
    - "Attachment X was modified on the tablet. What do you want to do?" (to make clear where the modified file is)
    - "Update Zotero file and leave on tablet" (to make clear that the file stays on the tablet)
    - "Update Zotero file and remove from Tablet" (to make clear that removing it from the tablet still updates the Zotero file)
    - I think "Cancel" should be the last, or rightmost, option.

    Somehow this is still not perfect but I think this wording would at least be an improvement because it states more clearly what will and will not happen.

    Also, you probably need to harmonize the Tablet/Reader terminology.
  • There is a new firefox update (8.0) and it tell me that zotfile 1.6.4 will not work anymore, is there any newer/working version of zotfile?
  • @mark: Thanks for the wording suggestions! I will think about a way to transfer the zotfile setup across computers or also from Zotero for FF to Standalone. But that will certainly come a little later.

    @Watari: I have updated the compatibility of zotfile without actually testing on FF 8. Usually, that is no problem though. Can you check again? I am not sure whether you have to reinstall or whether the change gets pushed to you zotfile version.
  • I finished to update to firefox 8.0 and it seems to work.
    btw, is there an newer version of zotfile 1.6.4 or beta available with more option?
  • watart, yes there is. check out my post on this thread from Sep 25th. The current beta version is 2.0b3:
    http://forums.zotero.org/discussion/18737/2/zotfile-reader-zotero-plugin-to-work-with-tablet-ipad-android-tablets-etc
This discussion has been closed.