ZotFile - Advanced PDF management for Zotero

1212224262760
  • I am doing both, so sometimes I link files, and I also let Zotero keep a copy by itself (automatically downloaded). Then, if I try to rename from the parent, or the individual entry, I get the error. I have tried with only pdf, only with link, and with both entries inside the parent, and it makes no difference.

    I'm using Zotero standalone version 4.0.8 in Ubuntu 12.04, and Zotfile version 2.3.5.
  • That is interesting. I have never encountered that issue. Here is a picture of my Zotfile preferences. Do they match yours?

    https://www.dropbox.com/s/8ebvvnzavlxkoj7/ZofFile%20Preferences.png
  • edited July 14, 2013
    Actually, my prefs are different, I specify the source folder, and leave the "Location of files" path empty:
    https://www.dropbox.com/s/a96ks68l0p7n3nc/zotfileprefs.png

    If I change the options as you did (leaving the source folder empty, and specifying "attach stored copy of file") then renaming works, but it also moves the file. This happens with linked files, whereas stored files are renamed normally.

    So my conclusion is that Zotfile cannot rename linked files without importing them to Zotero. Is that correct?
  • Ah, now I understand what you are trying to do. No,I don't think that is supported (but I'm not the developer). However, the commands to move the file are a single line in the ZotFile script. You could remove that line, but that is definitely getting into territory that is unsupported by the developer.

    Best,
    Brenton
  • Thanks for all the help!
  • Javis: I am not sure if you can rename a file without importing it, but I know that the following workflow is possible:

    1) Import a file and rename it
    2) Make the file a linked file by using the "Export to tablet" feature (You need to specify the target folder in Zotfile preferences)

    If I understood correctly, this would accomplish what you want to do.
  • Thank you, but it is not a perfect fix since I don't place my pdfs in a unique folder, and till now I organize them manually by topics.

    I may switch to other structures, seeing the tendency... Thanks for the help.
  • I wrestled with the same issues for a long time before I acknowledged a few facts:

    1) I will never be in a situation where I want to use my pdf library absent being able to use a front-end database management software like Zotero.

    2) In any situation where I want to move from one database solution to another (for example, when I moved from Endnote to Zotero), there will be relatively easy methods to transfer the database.

    With these two facts in mind, I concluded that I don't need to manage my library myself. I, too, organize my files by topic. But I now do this using tags or collections in Zotero, rather than manually in the file system. I have used both WebDav syncing and Dropbox-based file management with Zotfile. In the end, I opted for WebDav syncing, but both solutions work well. This honestly has been one of the biggest loads off my shoulders in terms of tedious tasks that I no longer have to perform.
  • Joscha,
    Thanks for a great application.

    There is unfortunately a slight problem when the name of a collection contains illegal folder characters. This came up in page 8 of this thread as regards filenames: if an article title contains a colon or question mark (: or ?) then sending it to a tablet will fail.

    Analogously, I was trying to send files to a tablet from a collection with a colon in it, and it gave the error message

    NS_ERROR_FAILURE: Component returned failure code: 0x80004005 NS_ERROR_FAILURE) [nsIFile.copyTo] (undefined, 1407)

    Removing the colon from the collection name fixed the issue. (I'm running Windows 7, Zotero 4.0.8 and Zotfile 2.3.5.) It would be great if Zotfile could remove the colons and other illegal Windows characters from collection names if those will end up as subfolder names.

    All the best,
    Emilio
  • Are there any plans to make Zotfile work with Kindles (the e-readers, not the Fire tablets)?
  • @adamsmith, thank you for that response, I didn't think it was double posting since the questions were distinct.
  • First of all - Zotfile is a priceless addon and a lifesaver. Kudos to the dev.

    I've got a question - is it possible to ctrl+a all articles in the root of the zotero library ("My Library" - which is the gathering of all articles from various collections and subcollections) and have them all automatically export (with auto-changing filenames) to appropriate collection/subcollection folder structure somewhere on the hard drive?

    Right now, I do this by going into each and every collection, ctrl+a articles from a single collection, right lick> zotfile export to a folder named after this one collection.

    I tried doing this with articles belonging to a few different collections and they all ended up exported to a single folder named after only one of these collections, instead of a few separate folders named after appropriate collection they were belonging to.

    Btw, thanks again for this incredible addon. My physics department requires me to store a copy of my personal library on a network drive, with appropriate pdf filename structure based on bibliographic info... I would have never done this manually. Those wildcard auto-renaming capabilities are just ingenious.
  • Thanks a whole lot for this awesome tool.

    I have one question. I work with a lot of Russian text in Cyrillic, but extracting it results in this: "    " (Grishin 2007:1)" Is Cyrillic simply not supported, or is there a workaround?
  • citizen_x, glad that you like zotfile. Unfortunately, what you are trying to do is not possible. Zotero items can be in multiple collections so that zotfile can not send items automatically to folders based on collections. The option "Create subfolders from zotero collections" has the effect that the different subfolders are shown as options when you right-click on items and go to "Manage Attachments" but it does not change the behavior of "Send to Tablet" (always goes to base folder).

    JohannesDue, when you can copy paste text from the document, there is chance that zotfile 3 works. It's under review at mozilla or you can get the current version from github, which includes some bug fixes compared to the version under review.
  • Joscha: Wouldn't what citizen_x do be possible in one of the two ways:

    1) Hard links
    2) Keep the file in the original directory, but create symbolic links based on collections

    I am not saying that you should do this, and this is probably really confusing for users who do not know how links work.

    I wrote a perl script to do the collection thing that citizen_x needs, but symbolic links are not very useful on network drives.

    https://github.com/mronkko/BuildFolderStructureForZoteroItems/blob/master/BuildFolderStructureForZoteroItems.pl
  • Yes, I guess that would work. I created a ticket for it but I don't think that I am going to do it myself. Not sure but this might also be system specific (maybe the FF API solves that problem though) and it might be a little confusing for most users.
  • Joscha,

    I'm wondering if you happen to see this earlier comment?

    There seems to be a bug in the way that the author truncation in the renaming function works.

    The desired behavior is for a maximum of three authors to be used in the file name. If an item has four or more authors, then the first three will be displayed, while the rest are truncated. The current behavior of the renaming function is to truncate down to only one author and then add the specified suffix (default to "et al"). This doesn't seem like it is intended to work this way. I would expect that the intention is to display the number of names specified in the "Maximum number of authors" option. Is this expectation incorrect? Could the extension be modified to correct this behavior?

    Many thanks,
    Brenton
  • That is intended behavior, citations work the same way...
  • edited August 9, 2013
    I see. From a file management perspective, though, I think it is less than ideal. For my use, the purpose of the pdf filename is to unambiguously name the file, so that it can be stored on a web server and linked to. Previously, I did this by using a series of other identifiers (volume, issue, pages, etc) and a list of all of the authors. This resulted in very long file names. My solution was to use only the first three author names. Zotfile seemed like a perfect way to automate this process until I found this behavior.

    What value does adding "et al" have in a file name? I understand the use in citation, but for file identification, what's the point? Would it be possible to add an additional preference specifying the number of authors to display when authors are truncated?
  • I have a problem with extracted annotations using the most recent version of Zotfile (3.0.2) on Linux.

    When I extract the annotations of highlighted passages, I get many characters that have been "substituted".

    So, for example, what should read:

    "The Digital Flood, dramatically expands the focus to include not just
    the American story but also western and eastern Europe as well as Asian
    countries like India, Japan, and China. This ambitious task is driven by a basic question: What was it about information technologies “that caused so many managers and public officials to embrace it?"

    comes out:

    "The 0igital Flood$ dra,atically e!(ands the "oc.s to incl.de not j.st the >,erican story b.t also western and eastern E.ro(e as well as >sian co.ntries like 7ndia$ Da(an$ and Hhina. This a,bitio.s task is driven by a basic G.estion: 9hat was it abo.t in"or,ation technolo-ies 2that ca.sed so ,any ,ana-ers and (.blic o""icials to e,brace itU3"

    So while many characters are correct, like 'T', 'h', 'e', or 'i', others, like 'm' or 'u' are consistently substituted for '>' and '.'.

    This was consistent with a few different articles. I marked up the PDF on an Android tablet with EZPDF.

    Has anyone seen this or is there anything I can do to help fix this?
  • edited August 10, 2013
    To bwiernik:

    Maybe I did not get you, but if you want just to choose the maximum number of authors to use , before the "et al.", cannot you just set in "renaming rules" - "Maximum number of authors"? At the moment I set 1, so I get my file with the first author and then et al (without a full stop!). Is that what you wanted?

    I hope this helps,

    Cheers
  • To breath:

    No, not exactly. When you specify the maximum number of authors, if you exceed that number, it reduces to one author plus et al. It seems to me like it should reduce to the specified number of authors. For example, if you have an item with six authors with a max of three, it reduces to the first author et al. I think it should reduce to the first three authors et al.
  • I am happy to accept a pull request that implements such an alternative treatment of the author formatting as an option...
  • Hi Joscha,

    I am having a problem with the renaming rules in zotfile. I have left the automatically generated rules of {%a-}{%y-}{%t}, yet it is only producing an author & year rename. I have the files set not to truncate and with no maximum length of title. (These are my preferences and I have tried using different combinations of these settings with no luck at producing an author, year, & title rename yet.) Zotfile is correctly moving the renamed attachment to the appropriate author subfolder.

    I am running the standalone version in Windows 8.

    Thanks for this tool!
  • Years ago, after quitting another reference management application, I decided to get all my scientific documents in one computer folder. (There are thousands of them.) I had to use very descritive file names, so I adopted the minimum citation in the NLM style, e.g. "Agresti A, Min Y. Unconditional small-sample confidence intervals for the odds ratio. Biostatistics. 2002 Sep;3(3):379-86".

    Now I'm using Zotero more and more, but I'd like to keep storing the PDF's in the same folder, with the same naming convention.

    Being a GNU/Linux user, I can have colons and question marks in my file names, but not regular slashes ("/"). I guess that applies to Mac OS X users, too.

    I believe ZotFile is (potentially) very useful, but it hasn't fitted my use case yet.

    Firstly, I'd like to make a feature request: please provide a wildcard for "Agresti A, Min Y", not just "AgrestA, MinY".

    Secondly, I'd like some help creating a rule to insert the colon before the page numbers. The best I could do was that:

    %F. %t.{ %s. %y; %v({%e}): %f}|{%p; %y}

    and it didn't inser the colon.

    Thanks in advance!
  • Zotfile 3 was finally approved by mozilla. The changelog is here. The highlights are:

    New Features
    - Improved extraction of annotation with pdf.js
    - Goto annotation in pdf (preliminary, see below)
    - Tablet feature: Restrict saved search for tablet files to sub-folders
    - Tablet feature: Support of colored tags in Zotero 4 (DO NOT manually add the tablet tag to items or attachments (also not using the keys for colored tags)


    Goto annotation in pdf
    The extracted annotations now include a link that opens the pdf file on the corresponding page. This feature, however, has several limitations.
    1) It only works from reports (right-click on item and select generate report) but future version of Zotero might be able to open the links directly from the note (see discussion here and here).
    2) It is not possible to copy and paste the links for opening the pdf file on a certain page (see this issue)
    3) The Windows implementation does not work. I have to work with someone who can test from code on windows to make this happen so reply to the github issue if you want to help.
  • "Zotfile 3 was finally approved by mozilla."
    Congratulations. But as a result it has been force-fed by Mozilla to all Firefox users, including the myriads who use Windows - BY FAR the vast majority of PC users. And as you have pointed out elsewhere, Zotfile 3.0 does not work with Windows.

    I'm sorry, I am not competent to test and amend at the source code level, so that I cannot volunteer to test and amend Zotfile 3.0.

    Please can you tell us ignorant Windows users how we can revert to an earlier version of Zotfile?

    And please can someone more competent than I help Joscha to keep his spendid Zotfile feature working on Windows? Thanks!
  • Zotfile 3 works fine with windows. Just one feature doesn't work (Goto annotation in pdf). So no reason to panic.
  • Thanks Joscha. Just for your amusement: the reason I posted was that Zotfile failed to rename an item from its metadata. But that was an hour or so ago; when I retried it after reading your response - it worked! Surely an instance of that variant of Murphy's Law which tells us that in the presence of the ignorant, a system maliciously malfunctions; but that when a master appears, it obediently functions? Thanks for a great tool.
Sign In or Register to comment.