ZotFile - Advanced PDF management for Zotero

1252628303163
  • "get from tablet" deletes the file from the Tablet folder and removes the tag.
  • @adamsmith
    Thanks for your comment. Okay, I suppose that makes it a little easier to manage the synchronized files. Still, is there not a way to track all the changes? Say, I have deleted 3 PDF files from the sync folder, is there a button to update (ie delete) all 3 files at once rather than searching for each entry and selecting "get from tablet" three times?
  • edited December 8, 2013
    You can find all items currently in the tablet folder in the "Tablet Files" saved search in Zotero. No need to search for them.

    edit: and to be clear - there is no need to do any deleting outside of Zotero. Zotfile handles both the removal of the tag and the removal of the file from the folder.
  • edited December 8, 2013
    I don't quite understand. Perhaps the way I use Zotero and manage my collection is quite different from normal. What if I want to keep the item, along with the PDF file, but simply want to delete from the sync folder? Does not clicking "move to trash" in the "Tablet Files" delete the item itself, thereby I lose the item itself from my collection? What if I wish simply to remove from "Tablet Files" but keep in my collection? Thanks again for your help!
  • no, you're just misunderstanding how Zotfile works:
    1. "Send to tablet" places a copy of the PDF file stored with or linked to the Zotero item(s) selected into the tablet (sync) folder specified in the ZotFile preferences and adds a tag _tablet to the pdf in Zotero

    2. Because of said tag, the item then shows up in the "Tablet Files" saved search in Zotero

    3. Selecting the item(s) and clicking "Get from Tablet" removes the copy of the PDF file that was placed in the tablet (sync) folder, attaches it to the Zotero item (by default replacing the original copy, but you can also set it up to attach a separate annotated copy), and removes the _tablet tag

    4. Because the tag is removed, the item(s) disappear from the "Tablet Files" saved search in Zotero.

    You should not use any delete or trash functions in this whole process.
  • Okay yeah, that really cleared up. Thanks! I couldn't quite get around the idea that the "Get from Tablet" command would somehow allow me to delete files as well. Thank you so much for your help! I'll now be making a lot of use of this tool!!
  • edited December 10, 2013
    Hi all,

    I've spent a while googling this and scanning this thread now, so I hope I'm not double-posting. I just wanted to ask if there is a possible way to make ZotFile automatically move every file in a folder to the tablet?

    When adding references (and files) to Zotero, I usually put them in a "To Read" folder. Ideally, zotfile would move all of those to the tablet straight away without needing special instructions... Is that possible?

    It's not like it's a lot of effort to right-click and select "Send to Tablet", but I often forget to do so before leaving the office - and then I am left without the reference on the long train ride :)

    Thanks for this fantastic tool!
  • When adding references (and files) to Zotero, I usually put them in a "To Read" folder. Ideally, zotfile would move all of those to the tablet straight away without needing special instructions... Is that possible?
    no, it's not currently.
  • Zotfile is hands down the most useful plug-in. I've recently had one hiccup, though. The extraction of annotations from one pdf are garbled and capitalized e.g. UIF FWJEFODF CBTFE QSBDUJDF PS QSPHSBN 4USVDUVSBM TVQQPSUT OFDFTTBSZ UP JOJUJBUF UIF QSP HSBN BSF QVU JO QMBDF
    I've tried coping and pasting text from the pdf, and this works fine. On a Mac, running Mavericks, with Firefox 25.0.1 and Zotfile 3.03.
    Tried to follow the website instructions for error reporting "check the Error Console in Zotero for Firefox by going to 'Tools->Web Dev.->Error Console" but the setup on the mac is different and I'm not sure which console is relevant.
  • …oh, and using Adobe Reader on work Windows computer to make annotations (sorry, not near machine now) and tried to add annotations on Mac using Preview. Same results
  • so this is one particular document that happens to? What type of PDF is that? Anything publicly available (even if gated)?
  • Yes, only one PDF. Available at:
    http://centerforchildwelfare2.fmhi.usf.edu/kb/Implementation/Implementation%20Research%20-%20A%20Synthesis%20of%20Literature%20%20-%202005.pdf
    I'm not sure what type it is: the document info panel has it listed as Kind: pdf
  • thanks - link to the pdf is great.
  • Feature Request (reposted from https://forums.zotero.org/discussion/33976/zotfile-request-allow-use-of-institution-in-folder-hierarchy):

    I have a lot of Report items in my library. ZotFile allows the use of %j for journal, %p for publisher, or %w for {%j|%p}. Report items do not have a journal name or publisher, but do have an institution (which maps to publisher if you switch item types). I would like to to be able to include institution in the "subfolder defined by" string, maybe even have %w change to {%j|%p|%<institution>} (i.e., use Institution if no Journal or Publisher are defined).
  • leehach, I have added a new wildcard (%S) for institution and also changed %w. It's going to be part of the next version.
  • Hey guys, first off apologies if this is a repeat question - I went through the forum pages but didn't spot anyone suffering from a similar problem as me...
    Currently using a Mac osx 10.9.1, zotero standalone, dropbox, samsung snote 10.1 and ezPDF to do all the work for me. I've been testing it out and when I "send to tablet" and annotate on the tablet, it gets saved on the appointed dropbox folder (dropbox/app/ezpdf for me). The problem is retrieving the annotated file.
    1. if I simply "get from tablet", none of my annotations are retrieved and the stored copy of file pdf is not altered
    2. if I extract first, then the highlighted extractions are uploaded. however when I "get from tablet", then the same problem in 1. happens.
    I checked the pdf file on the dropbox folder itself before "get from file" and the annotations are there, it seems there's something I'm missing in the "get from tablet" stage. I've tried both pdf.js and poppler. I've even tried checking the "create new file with _annotated" option and that changes nothing.
    Any help will be great! Cheers and happy holidays
  • Quick question, is it possible for Zotfile to rename files without creating a copy of the file or moving it anywhere, just changing the filename of the original file and leaving it in its original folder?
  • @cbmc

    This depends on exactly how you are storing your files. Can you provide some more details? Are you using Zotero storage? Are you putting in links to files manually?
  • @bwiernik

    I'm new to this, so right now I have been manually adding links to my files from my existing giant folder of PDFs in my Dropbox. I'm not using Zotero syncing or anything.
  • no, that's not possible. You can use Zotfile and move the files or you can use Zotfile and leave the files in Zotero, but you cannot use Zotfile and leave files where they are.
    That said, you can use Zotero's own "Rename file from parent metadata" for any attached file without moving it.
  • @matt0410 - doesn't sound like you're doing something wrong, this should work. Maybe Joscha has an idea on how to troubleshoot this, but would maybe be helpful to try this with PDFs annotated with a local pdf reader like Preview.
  • @Joscha - could you let us know whether there have been any developments on the following question (stated in this thread on 14 feb 2012):

    Guppy: Suggestions: 1. I would love to be able to optionally extract each comment to a separate note. Then I could tag and access the notes individually later...

    Joscha: I added 1 to the list.

    I think this is pretty essential; creating a separate note for each annotation is the only way that the extracted quotes can be individually retrieved later on (via zotero search window); otherwise you end up with a single, very long note.

    many thanks and all the best from london
  • edited January 5, 2014
    [UPDATE] Nevermind, I have solved the issue. Somehow I had missed an option in "Advanced Settings" that allows the user to specify under which circumstances ZotFile should rename the added files.


    I apologize for cutting in the on-going discussion, but can someone please tell me if it is possible NOT to automatically rename the files that are added to Zotero? It seems that I cannot disable the auto-renaming feature in ZotFile even when I have the option "Use Zotero to rename" enabled.

    I prefer to edit the filenames myself (since there isn't a way to add an author's first name as far as I can tell), so I would very much like to know if there is a way to simply turn off the feature without disabling the entire add-on.
  • @matt0410 - Your problem doesn't seem to be related to the extraction of annotations. Can you check whether there is an error message?

    @laurence.doering - There hasn't been any progress on that front. Actually, I closed the issue because it's not desired from the zotero side (many notes really slow down syncing). I have no idea but maybe adamsmith knows whether that has changed? If something has changed on the Zotero side, it would be great if a contributor adds the feature. I am happy to provide guidance.
  • nothing new on the Zotero side, no. Avoiding very large numbers of notes is still recommended.
  • edited January 6, 2014
    I can report the same problem that matt0410 has.

    My OS is Arch Linux, my Android device is a Moto G phone and I have tried both Zotero standalone and Firefox.

    Same issue: import paper to library, send to tablet, annotate on device, save to Dropbox. It works fine at that point. However, upon clicking "Get from tablet", the annotated PDF does not replace the original/get moved as "_annotated" version. Absolutely no errors in the Firefox console.

    The annotation extraction is not the issue, as it works perfectly when manually replacing the file and using the extractor.

    However, I did some more tests. After sending the paper to tablet, I replaced the PDF in the Dropbox folder with a simple PDF exported from Libreoffice (it only said "This is a test"). This one worked perfectly when clicking "Get from Tablet". Re-sending this simple PDF and annotating it on my phone produced the same issue as with the original paper: the file disappears from Dropbox, but does not get moved to Zotero. This behavior occurs annotating with Acrobat Reader and RepliGo Reader.

    I'm beginning to think this issue isn't ZotFile's fault; it's probably the tablet's e-reader software when saving the annotated document. Maybe it changes something which causes ZotFile to not be able to read the document properly?

    EDIT: I ran Firefox as root to see if anything changed. The send->annotate (RepliGo Reader) -> get from tablet process worked to perfection. A permissions issue may be what's preventing Zotero from moving the file.
  • aferreira, thanks for the report. I just put a slightly changed test version on github that shows an additional info window when you get files from the tablet. Actually there are other additional info window but the one relevant for this issue has the title 'info'. Whenever you get a file from the tablet, zotfile shows the filepath on the tablet and two additional variables in brackets. Clicking on the window copies the information to the clipboard so that it's easy to get the path. Can you use that information to investigate further? Does the shown file path match the one on the tablet? The 'valid' info indicates whether zotfile thinks that the file is a valid path. The other variable 'option' has this meaning:
    option=0 - The file on the tablet was modified and should replace the one in zotero
    option=1 - Both the file on the tablet and the file stored in zotero was modified so the user is asked what to do
    option=2 - The file on the tablet was not modified and should be removed (when you move to tablet and get right away without modifying the file)

    0 and 2 should be the interesting cases. If you find out more, I can do another version that gets more information.
  • edited January 7, 2014
    -Installed the github version
    -Sent a paper to my phone
    -Annotated a section of the text
    -Attempted to get from tablet
    -The "info" window says:
    /home/aferreira/Dropbox/papers/Lehre and Yao - 2012 - On the Impact of Mutation-Selection Balance on the.pdf (option:2, valid: true)
    -The original does not get replaced. Understandable, as it seems that the changes are not being detected (option=2) and thus the program only removes the tablet PDF.

    The paper was downloaded from IEEEXplore at http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=5910379&openAccess%3Dtrue%26queryText%3Devolutionary

    EDIT: Skimming through zotfile.js, I think the modification times are being set incorrectly on one of my devices. Modified the zotfile.js to output the modification times in the "info" window and time_saved is being reported as greater than time_reader and thus option becomes 2.

    SOLVED: Yes, the issue was definitely with my clocks. Sent a file and ls says last modified at 13:35. Did a quick highlighting, returned it and the modification time is now 13:34. Then I noticed my phone's clock is behind my PC's by about 3 minutes. Doing the same process but holding out five minutes more to edit the document resulted in zotfile getting it back correctly (as the edit check relies on modification dates). I think the people who have reported a similar issue have been just checking out the tablet sync feature, doing quick test annotations (like me) but happen to have their tablet's clock behind their desktop's; finishing the edition in less time than the difference which results in a lesser modification timestamp and zotfile detecting no change. Of course, when someone actually takes the time to read & annotate a document, that slight difference will not even matter and zotfile will work as expected.

    In summary, had I taken longer when testing out zotfile, I wouldn't even have noticed an issue!
  • edited January 7, 2014
    Edit: okay, thanks! Forget the message I just posted...

    I will still think about a possible solution. Not sure whether I will come up with something though.
  • Well, checking for changes using modification date/time is reliable for the most part except cases like mine where the devices were not in sync...I guess a 100% method would be checking the actual file contents but would that be too inefficient?
This discussion has been closed.