Not signed in (Sign In)
 

Quick Links

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorJoscha
    • CommentTimeJan 10th 2009 edited
     
    ZotFile is a Zotero plugin to manage your attachments: automatically rename, move, and attach PDFs (or other files) to Zotero items, sync PDFs from your Zotero library to your (mobile) PDF reader (e.g. an iPad, Android tablet, etc.) and extract annotations from PDF files.

    See zotfile webpage for more information.

    DONATION
    If you are using this add-on, please consider a donation through paypal. Just go to the webpage above and click on 'donate'.

    Attach New Files to Zotero Items
    ZotFile can rename and add the most recently modified file from the Firefox download or a user specified folder as a new attachment to the currently selected Zotero item. It renames the file using metadata from the selected Zotero item (user configurable), and stores the file as a Zotero attachment to this item (or alternatively, moves it to a custom location).

    (Batch) Rename and Move Attachments based on Zotero Metadata
    The user can also select any number of Zotero items and automatically rename and move all attachments of these items according to the user defined rules using metadata of the respective zotero item (batch processing).

    Sync PDFs with your iPad or Android tablet
    To read and annotate PDF attachments on your mobile device, zotfile can sync PDFs from your Zotero library to your (mobile) PDF reader (e.g. an iPad, Android tablet, etc.). Zotfile sends files to a location on your PC or Mac that syncs with your PDF reader App (PDF Expert, iAnnotate, GoodReader etc.), allows you to configure custom subfolders for easy access, and even extracts the annotations and highlighted text to Zotero notes when you get the files back from your tablet. For instruction, click here.

    Extract Annotations from PDF Files
    After highlighting and annotating pdfs on your tablet (or with the PDF reader application on your computer), ZotFile can automatically extract the highlighted text and note annotations from the pdf. The extracted text is saved in a Zotero note. Thanks to Joe Devietti, this feature is now available on all platforms based on the pdf.js library.
    • CommentAuthorprotosslee
    • CommentTimeJan 20th 2009
     
    Hi,
    nice tool.
    however, I have problems when I "zotfile-rename,move and attach files" It says not able to find the files in the folder.
    I've changed the about:config to
    C:\Documents and Settings\admin\Application Data\Mozilla\Firefox\Profiles\wi2i2oeo.default\zotero
    what could be wrong? I also tried to replace "\" by "/" but no result.
    • CommentAuthorJoscha
    • CommentTimeJan 21st 2009
     
    Hi, can you be a bit more specific and tell me which preference you changed to "C:\Documents and Settings\admin\Application Data\Mozilla\Firefox\Profiles\wi2i2oeo.default\zotero"? I assume that it was extensions.zotfile.source_dir !?
    This is the directory where ZotFile looks for the most recently modified file. More specifically, ZotFile looks for files which end with pdf, doc, txt, or rtf and then selects the most recently modified. The error message you describe should usually occur when ZotFile does not find a file which has one of the mentioned endings in the source dir. Are you sure that there is one of these files in the folder you specified? If you are sure, I will further look into this issue and try to figure out why it does not work.
    • CommentAuthorprotosslee
    • CommentTimeJan 22nd 2009
     
    Yes, I did change the extensions.zotfile.source_dir to the default folder where zotero save pdf files:
    C:\Documents and Settings\admin\Application Data\Mozilla\Firefox\Profiles\wi2i2oeo.default\zotero
    Or
    C:\Documents and Settings\admin\Application Data\Mozilla\Firefox\Profiles\wi2i2oeo.default\zotero\storage
    I also reconfigured zotero to save it in different folder:
    d:\Document\Literature\Zotero\storage\
    And I am sure I have new pdf files in the folder.

    May I point it out: looking for the new files might be a good choice. It could make problems when I save multiple articles and then download pdf files. It could be confused and link pdf to wrong items.

    It would be great to make a full-range stand-alone application that looks into the sql database and change all filenames and relink back to sql database.

    But, nevertheless, thanks for your work.
    • CommentAuthorJoscha
    • CommentTimeJan 22nd 2009
     
    Hi, there are actually no files directly in Zotero's storage folder because all the files are placed in subfolders. Since zotfile does not look for files in subfolders, it does not find any files and shows the error message.
    But I also think that this is not the right way to use zotfile. I wrote the plugin to avoid zotero's approach to store files mainly because I prefer to link attachments from an arbitrary directory and because I prefer to give them meaningful names. Both allow me to easily access these files from outside Zotero because they are stored in a certain directory (such as a Literatur folder) and because I can easily recognize them through their filename. If you want to use zotfile you should change the preference extensions.zotfile.source_dir to your download folder in Firefox. After having done this you can just download a pdf with Firefox, select an item in Zotero (the one to which the pdf should be attached) and press the zotfile bottom. zotfile will rename the pdf using metadata from the selected file, move it to the directory you have specified and attach it to the item as a linked attachment.
    • CommentAuthorJM
    • CommentTimeFeb 27th 2009
     
    Looks like a great tool, Joscha! But after restart, I can't see the paper clip link in my zotero toolbar.

    I downloaded Zotfile into Zotero 1.5b1, restarted Firefox 3.0.6, updated about:config settings to be (source_dir= /Users/Shared/JM Downloads) (dest_dir= /Users/Shared/JM Documents/Research/Downloaded Sources). I don't have lytero. I'm running Mac OS X 10.5.6

    How can I tell if I'm running Preview 3.6?
    • CommentAuthorLanius
    • CommentTimeFeb 28th 2009
     
    Hi Joscha,
    nice tool, however, I am experiencing some problems:

    There is no zotfile (paper-clip) button in between Add note and Handglass buttons in Zotero after instalation and restart, what could go wrong?

    If I prefer to keep Zotero´s way of PDF storage,
    should I write c:\Documents and Settings\PC\Data aplikací\Mozilla\Firefox\Profiles\m6yvwmbp.default\zotero in dest_dir, please? (because Zotero is storing PDFs in another subfolders within this folder).
    • CommentAuthorJoscha
    • CommentTimeFeb 28th 2009
     
    Hey,

    JM, you are fine with 1.5b1 which is a newer release then 1.5 Preview 3.6 (I will change this on the website).

    In regard to the problem with the paper-clip button somebody else had the same problem and told me that it worked after he reinstalled the plugin. So just try this and let me know whether it works for you. By the way, you should also see a zotfile entry at the button of the menu when you right click a zotero item.

    Lanius, you could use "c:\Documents and Settings..." as the dest_dir but it would still be different then the way Zotero stores pdfs. 1) Zotfile would just place the files in the folder without using the subfolder system zotero is using. 2) zotfile just creates a linked attachment which can be at any place whereas zotero uses this place to store copies of stuff (if you press add attachment and then "Store copy of file). I don't know whether this makes a difference for syncing pdf attachments (I have never tried). There might be other difference in the way Zotero treats the two types of attachments (stored copies and linked attachments).
    • CommentAuthorLanius
    • CommentTimeMar 1st 2009
     
    Hi Joscha,
    reinstallement helped,
    version 1.5b1 works

    I will play with PDF storage folder placement and syncing...
    Many thanks,
    Best wishes
    • CommentAuthorLanius
    • CommentTimeMar 1st 2009
     
    I have created PDFs folder within ZOTERO folder for dest_dir, it works, however, files within this folder are not synced, nor indexed...
    • CommentAuthorJoscha
    • CommentTimeMar 1st 2009
     
    Hey Lanius, I anticipated the problem with syncing because I expected that Zotero only syncs stored pdfs and not linked attachments. I guess this is an disadvantage of the linked attachment approach. The advantage (at least for myself) is that I can store the files where ever I want.
    Indexing should work though. I stopped using it because it causes Zotero to freeze for a second or so. Currently, I am not sure what to do about it. But I might look into it when I find some time in the near future.
    • CommentAuthorLanius
    • CommentTimeMar 2nd 2009
     
    Hi Joscha,

    For the moment, I am solving both problems attaching renamed PDFs from the destination folder, this way is still much more comfortable than manual renaming...

    Many thanks, Best, Lanius
    • CommentAuthorJM
    • CommentTimeMar 3rd 2009 edited
     
    Hi Joscha,
    Reinstall did the trick. Paper clip and right-click contextual menu are both there, and work beautifully! And indexing works too. Thanks again. Never again will I wonder whether I meant to read 346723.pdf or 7223541.pdf.

    :-)
    • CommentAuthorJM
    • CommentTimeMar 3rd 2009
     
    Er, spoke too soon. After rebooting my machine and restarting Firefox, I've got no paper clip and can't access the ZotFile preferences in the Add-Ons menu (although ZotFile is visible there and appears enabled). Tried reinstalling again & restarting Firefox several times, w/ no luck. Any ideas? (Zotero 1.5b1, Firefox 3.0.6, Mac OS X 10.5.6)
    • CommentAuthorsrg.qut
    • CommentTimeMar 3rd 2009
     
    I have a (slightly) different bug. I see the paper clip icon that others seem to have missing BUT I don't get the right-click context menu to make it all work... & pressing the paper-clip icon doesn't make it work either (So no PDF's get moved or re-named etc..). I have set up the about:config settings for my installation & tried re-installing the addon a couple of times - but - no luck. Any ideas (Zotero 1.5b1, Firefox 3.1b2, WinXP SP3) ?
    • CommentAuthorJoscha
    • CommentTimeMar 4th 2009
     
    Hi,
    JM: the problem is that I really don't know anything about the stuff which is related to placing the icon in Zotero. I just copied the code from lytero and changed what I thought should be changed. That's also the reason why lytero and zotfile do not work together. So I can't really help. Maybe there is somebody around who knows something about this and is willing to look into this stuff.
    I have one idea though (it's annoying however): You can try whether you have the same problem with a different firefox profile. If you don't, you might consider transferring your data to the new profile.
    Here are some information about profiles:
    http://support.mozilla.com/en-US/kb/managing+profiles

    srg.qut: Your problem seems to be different. Maybe it's related to Firefox 3.1b2. I can't tell until I am using 3.1 myself. If this is the case, I will work on the problem when 3.1 is released.
    • CommentAuthormronkko
    • CommentTimeMar 5th 2009
     
    Hi

    There is a small bug in this software. If the filename extension is in upper case (file.PDF) it is not included.

    This can be fixed by changing line 182 of zotfile.js from

    var filetype=this.getFiletype(file.leafName);

    to
    var filetype=this.getFiletype(file.leafName).toLowerCase();

    For those that want to do this fix themselves, the file is located under your firefox profile. On my mac the path is

    ~/Library/Application Support/Firefox/Profiles/l5auep3s.Mikko/extensions/zotfile@columbia.edu/chrome/content/zotfile/zotfile.js


    Mikko
    • CommentAuthormronkko
    • CommentTimeMar 5th 2009
     
    With the proposed fix, the file name extension still stays upper case. A better fix would be to change line number 158

    from
    return(temp[temp.length-1]);

    to
    return(temp[temp.length-1].toLowerCase());

    Mikko
    • CommentAuthormronkko
    • CommentTimeMar 5th 2009
     
    After testing this great plugin for a while I ended up accidentally attaching a wrong file several times. This can happen if you have downloaded more files after the one that you want to attach.

    One possible solution to this issue would be a confirmation dialog. This can be done by adding the following on line 240. (You also need to add the closing bracket) This could be made optional at the settings, but would be a good feature for the next release.

    if(confirm("Do you want to rename and link file \'" + lastfile_oldpath + "\' to the currently selected Zotero item?")){


    Mikko
    • CommentAuthormronkko
    • CommentTimeMar 5th 2009
     
    I did some changes and now this is just the perfect plugin for my needs
    -makes filename extension lower case
    -asks for a confirmation before attaching a file
    -attaches the file as a zotero attachment instead of linked file

    The content of my modified zotfile.js can be found here

    http://pastebin.com/f4c187307

    Mikko
    • CommentAuthorJoscha
    • CommentTimeMar 5th 2009
     
    That's great, Mikko. Thanks!
    Do you mid if I add this stuff to zotfile? I thought about providing two further options through about:config: a) whether people want to be ask for a confirmation and b) whether they want to link or attach the file to zotero.
    Can you also point me at the changes for attaching files? Are these two lines all the changes?
    Zotero.Attachments.importFromFile(lastfile, item.itemID);

    //Delete the old file that is not longer needed
    lastfile.remove(false)
    • CommentAuthormronkko
    • CommentTimeMar 6th 2009
     
    Feel free to use the code anyway you like.

    A diff of the original and my additions can be found at http://pastebin.com/mda4b42c The changes are also now highlighted in the code I posted http://pastebin.com/m618943b

    I did three things
    1) Added toLowerCase in the function that gets the file name extension
    2) Added a confirm dialog and enclosed the code for copying the file and creating the Zotero attachment inside an if-block
    3) Changed the linkFromFile to importFromFile and added a command to remove the extra file since importFromFile makes a copy of the original

    Mikko


    Mikko
    • CommentAuthorJoscha
    • CommentTimeMar 7th 2009 edited
     
    Hi, I have updated the plugin with Mikko's suggestions.

    http://jlegewie.com/zotfile.html

    The changes:

    1) confirm dialog (you can turn this of with the confirmation option)
    2) You can now decide whether you want to link or import the file (.import option). Zotfile either creates a link (.import=false) to the renamed file (which means that the file remains in the dest_dir) or imports the file so that Zotero stores a copy if it (in this case the file at dest_dir is deleted).
    3) small bug fixed
    • CommentAuthorstervbo
    • CommentTimeMar 7th 2009
     
    Nice plugin!

    Would it be possible to use journal abbreviation instead of journal (and journal if no abbreviation exist)? The idea would be to have shorter file names with the same information, and should work well in natural sciences.

    Also; white spaces in the filename elements (author, journal ect) should be replaced with _ imho - or hopefuly the option given

    Shame that import dosent work in linux... Minor flaw I can live with :-D

    Keep up the nice work!
    • CommentAuthorKeith
    • CommentTimeMar 14th 2009
     
    I love this plugin, and would like to thank Joscha for creating it.

    Just one tiny request, please: In the renaming process, underscores are not inserted before, between, and after the words "et al". This is slightly inelegant, since underscores are used instead of spaces elsewhere, and it also messes up the directory listing (Bloggs et al comes before Bloggs_2000). Do others agree, and, if so, could it be fixed, please?

    Thanks again -- this is a great addition to Zotero!
    • CommentAuthormronkko
    • CommentTimeMar 17th 2009
     
    I found a small bug in the plugin that causes the Zotfile button to disappear.

    On OS X and Firefox 3.1, do the following:
    1) Open firefox
    2) Open zotero
    3) From file menu, choose "open new window"
    4) Open zotero in this new window - Zotfile icon does not show

    Mikko
    • CommentAuthoradamsmith
    • CommentTimeMar 17th 2009
     
    this is a cross-platform bug. Also true in Linux.
    (where, by the way, the import function doesn't work either (attachment never worked). Josua has tried his best, but if anyone else wants to take a shot?
    • CommentAuthorJoscha
    • CommentTimeMar 17th 2009
     
    hey,

    stervbo and Keith: I have uploaded a new version which allows you to a) use journal abbreviation ('%s' in the renameFormat option), b) replace blanks with underscores '_' (option: replace_blanks), and c) change the string which is added after the first author if the option 'add_etal=true' (option: 'etal' - default is " et al" so that the same filenames are produced as before. You can just replace this with "_et_al" and get the desired result).

    mronkko: There are several people who have reported problems with the zotfile button. Your description is very helpful because it's easy to reproduce the bug. The problem is that my knowledge about the XUL language (Firefox User Interface Language) is very limited (for the interface part (the button), I just copied the interface code from lytero). So I have no idea where the bug comes from. I would be happy if anyone is willing to help.
    • CommentAuthormronkko
    • CommentTimeMar 17th 2009
     
    Have you tried asking Mozilla developer forums?

    http://forums.mozillazine.org/viewforum.php?f=19

    Mikko
    • CommentAuthorkerim
    • CommentTimeMar 17th 2009
     
    This seems great, but what I'd really like is something a little different. I already have hundreds of PDFs sitting on my HD and it would take days to import them into Zotero by finding the matching titles and re-importing them. Since almost all these files are already named with the relevant meta-data, I'd like to be able to have a plugin which attempts to match these PDFs to existing citations and then imports them to Zotero.

    A second feature I'd like is similar to what Sente can already do - where when there is no matching citation you can do a search based on data in the PDF file itself: DOI if there is one, or author/title information, and then to create a new entry at the same time as importing the PDF. (See the Sente website for short videos showing how this works.)
    • CommentAuthornoksagt
    • CommentTimeMar 17th 2009
     
    If you just add the PDFs to zotero & they can be indexed, then you can right click & choose to retrieve metadata for the pdf. It will look on Google scholar for the information.

    It is planned to expand this to use other methods of retrieving PDF metadata (such as through DOIs).
    • CommentAuthormronkko
    • CommentTimeMar 18th 2009
     
    kerim: I have exactly the same problem and I am working on a solution of reading the author and title information from a PDF. More information here

    http://forums.zotero.org/discussion/6129/translators-for-pdfs/


    Mikko
    • CommentAuthormronkko
    • CommentTimeMar 20th 2009
     
    I have a small enhancement proposal. The future versions of Zotfile could use Zotero functions to create the filenames instead of implementing another mechanism to determine the name for the PDF.

    Replace this line
    filename=this.createFilename(item, rename_rule);

    with this one
    filename=Zotero.Attachments.getFileBaseNameFromItem(item.itemID);

    After this the function createFilename and the associated preferences can be removed.

    Mikko
    • CommentAuthorstervbo
    • CommentTimeMar 22nd 2009
     
    Works like a charm with my portableFirefox 3.07 on windows xp, using networkdrives. Really nice plugion!
    • CommentAuthorzhangwei
    • CommentTimeMar 23rd 2009 edited
     
    I think the source_dir option is not a good method. Why can't zotfile automatically find where the pdf file is?
    • CommentAuthoradamsmith
    • CommentTimeMar 23rd 2009
     
    how would it tell? What is "the" pdf file?
    • CommentAuthorzhangwei
    • CommentTimeMar 23rd 2009 edited
     
    Sorry. After I reread the description of zotfile, I realized I had a misunderstanding about the use of zotfile. I thought zotfile could rename, move, and attach files in the zotero collection.
    • CommentAuthorKeith
    • CommentTimeMar 27th 2009
     
    Thanks for responding to my request Joscha. This is really is an excellent addition to Zotero.
    • CommentAuthormronkko
    • CommentTimeApr 17th 2009
     
    This does not seem to work with Linux. Moving the file causes some kind of error.

    I created a patch that can be used to replace one code block to get the import functionality working on linux. Linking does not work with this.

    http://rafb.net/p/F69oo111.html

    Mikko
    • CommentAuthoradamsmith
    • CommentTimeApr 18th 2009
     
    thanks mikko - that would be great but can't get the link to work - I get a 404...
    • CommentAuthorKariLeigh
    • CommentTimeApr 21st 2009
     
    All - This plug-in is great, but I seem to be having a small issue - my renamed.pdf files end up in the Zotero storage location (ie D:\Kari\JournalLibrary\ElbePapers\storage\KATT7DG2), and not the dest_dir I have set in about:config. I'd greatly appreciate any insight into how to remedy this.

    thanks!
    • CommentAuthormronkko
    • CommentTimeApr 21st 2009
     
    There is a preference called zotfile.import or something similar. Change this to false.
    • CommentAuthorgregsharp
    • CommentTimeMay 11th 2009
     
    Nice plug in. Thanks Joscha and contributors.

    Any chance that this could work with drag-and-drop as well? I would like to drag the URL of the PDF from the journal web page onto the citation, and then it gets downloaded, renamed, saved and synced. Wow! That would be so cool. Save the annoyance of browsing to the "zotfile import folder".
    • CommentAuthorJoscha
    • CommentTimeMay 15th 2009
     
    That's a nice idea but I wont be able to do it in the near future.
    But maybe this helps: I never have to browse to the "zotfile import folder" because I use a default download folder (which you can set on firefox's main preference tab) so that files always first go to a specific folder. This folder is also my "zotfile import folder". Accordingly, I can just press the zotfile icon without browsing to the "zotfile import folder".
    • CommentAuthorgregsharp
    • CommentTimeMay 27th 2009
     
    Hi, I am happily using zotfile for a few weeks, and now today the paper clip icon has suddenly disappeared. I see that JM had this problem early. Is there yet any explanation for this? I did try re-installing zotfile, but no dice.
    • CommentAuthorgregsharp
    • CommentTimeMay 27th 2009
     
    I may have answered my own question, in part.

    1) If you start up a fresh firefox, the icon is there.
    2) If you create a new window, there is no icon in the second window. But I still have an icon in the first window.
    3) If you close the first window, voila! No paper clip in my firefox.

    I will keep investigating, but I think I am close...
    • CommentAuthoradamsmith
    • CommentTimeMay 27th 2009
     
    yes, that's it, I think we've had that issue before, it might even be mentioned on the Zotfile page under known issues.
    • CommentAuthorSiGi
    • CommentTimeMay 28th 2009
     
    Hi,
    I'm new to zotfile. I want use it, but I get it not working (zotfile 1.0.2, zotoro 2.0b4, firefox, 3.0.10, windows xp).

    I have allready reinstalled the xpi and followed the tipps given here, but I can't see the zotfile icon in the zotero toolbar.

    Are there any problems with zotfile and zotero2.0b4? Help is welcome.
    • CommentAuthoramacom73
    • CommentTimeMay 28th 2009 edited
     
    Hmm. I just tried on exactly the same setup (on a virtual machine within mac OSX), and the combo of zotfile102, zotero2b4, znc ff3010 works fine. If you only have one ff window open, and you've already changed the about:config settings, I'm stumped. If the button doesn't even show up, there's little to troubleshoot. The major known issues are with Linux and Lytero.

    What happens if you right-click a Zotero item--does a Zotfile option show up at the bottom of the context-dependent menu?
    • CommentAuthoramacom73
    • CommentTimeMay 28th 2009
     
    I should add, by the way, since this thread seems to attract all the zotfile aficionados, that I "discovered" a neat side effect of the way zotfile interacts with the download source directory. Since zotfile moves (as opposed to copies) the file, the next-newest download becomes the newest download each time the Zotfile button is hit, thus moving it from zotfile's on deck circle to the batter's box, as it were. So it's possible to add a zotero item, download the PDF, {repeat as many times as you want}, sort the Z items by date modified, and go down the list, hitting the zotfile for each Z item as PDFs get removed from the downloads folder and the next one in line moves up to the top spot. Hope this makes sense and is useful.

Zotero Forums are powered by Vanilla 1.1.5a