ZotFile - Advanced PDF management for Zotero
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
This discussion has been closed.
No problems at all with Acrobat. And I find its search feature much better. So I'll ditch Preview for this purpose, although I still use it when needing to delete/reorder/merge pages.
I am using Zotfile to classify my pdf library, and I have a question. By default, Zotfile allows you to replace blanks with underscores by checking the "Replace blanks" option.
I have read several recommendations on this, which advise the use of dashes instead of underscores to name files:
https://records-express.blogs.archives.gov/2017/08/22/best-practices-for-file-naming/
(in the comments, they cite ISO 8601)
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/Dealing_with_files
https://x-equals.com/dashes-versus-underscores/
https://yihui.name/en/2018/03/space-pain/
Therefore, I would like to know if there is any way in Zotfile that would allow the blanks to be replaced by dashes ("-"). In the future, if I am allowed the suggestion, it would be interesting to have the option of choosing underscores ("_") or dashes ("-") to replace blanks.
Thank you, and thank you for developing and improving this plugin.
I use zotfile to rename attachments and move them into a cloud folder ...
I use my own renaming convention: {%a_}{%y_}{%t}.
This works well when there is one attachment, but if there are two, then they both appear in zotero with the same name, although two files appear in the file, so we have, e.g.
Paper title:
Author_2016_paper_title
Author_2016_paper_title
appearing in Zotero, and
Author_2016_paper_title.pdf
Author_2016_paper_title2.pdf
appearing in the folder.
(This all on MacOS using the latest zotero.)
I cannot get to the second pdf file from within zotero ... clicking on either of the the attachment names simply gives the first (not suprisingly). Obviously I can get at them from the file system.
Is this a bug, or have I set this up wrong somehow?
Thanks in advance,
Bryan
FWIW, the recommendation for hyphens over underscores only refers to files on the web (where google prefers the former). And you're misreading at the first post you link to: ISO8601 is only about time & date, so they refer to the fact that dates should be in the form YYYY-MM-DD this has no bearing otherwise on file names.
1. How can I setup Zotero and Zotfile such that: When I add an item using Zotero's browser connector, Zotero will download the associated PDF to a folder watched by Zotfile, and then Zotfile will rename the PDF, move it to a custom folder, and attach a link to the item just added in Zotero?
2. Can I have Zotfile rename such that (a) the first alphabet of each word in the journal name is used (b) only some parts of the title are used with a dash separating each word?
Haugen, M. J., G. A. Bishop, A. Thiruvengadam, and D. K. Carder. Evaluation of Heavy- and Medium-Duty On-Road Vehicle Emissions in California’s South Coast Air Basin. Environmental Science & Technology, 2018. https://doi.org/10.1021/acs.est.8b03994.
Thus, above item would have a PDF renamed as:
Haugen_2018_EST_evaluation-heavy-medium-morewords.pdf
My current renaming rule is:
{%a_}{%y_}{%s|%j_}{%t}
And that produces a PDF name of:
Haugen_2018_Environ. Sci. Technol._Evaluation of Heavy- and Medium-Duty.pdf
2. At least not with reasonable ease. Maybe you could get a custom wildcard to do this, but it'd have to be pretty involved.
1b. I also have many hundreds of items in Zotero for which I have not downloaded the PDF. What the best way to download the PDF, rename, and attach as link for these already existing items? Should I use the "Find available PDF" function from the right-click menu, let Zotero do it's thing, and then use Zotfile to rename and move?
Note: For both 1a and 1b, I am trying to avoid sending anything to my Zotero/storage folder since ultimately I want everything to be attached as a link. And I suspect sending to the storage folder first and then moving the PDF will still leave behind a folder with no purpose. Or maybe Zotero in any case has a folder for each attachment even when it is attached as a link? Currently I have a couple thousand folders with only two files in each (.zotero-ft-cache and .zotero-ft-info).
2. Is the journal name part difficult or the title part or both?
1b) yes, that's right. ZotFile won't auto-move PDFs retrieved that way, so you'll need to do that manually via right-click, but you can do so in batch
2. both, probably the title is harder, but both require significantly changing the string in question.
1b. Guess what, it all happened in one step! I selected a bunch of items, right-clicked and selected "Find Available PDFs". The PDFs were download, renamed per Zotfile rules, moved to my PDF folder, and attached as a link.
2. Okay, thanks.
I was really excited to start using Zotfile, but for some reason it doesn't work:
I've created a folder on my desktop to which I download pdfs. I've defined that as my source folder and have defined another folder as the target folder.
Zotfile doesn't do anything. It doesn't scan the source folder, doesn't update Zotero and doesn't move things to the target folder. What should I do?
The error ID is 917498325
I'm using Zotero 5.0.58 on a Mac.
I'm using the latest Google Chrome
I'm using Zotfile version 5.0.9
Thanks in advance...
https://forums.zotero.org/discussion/74208/zotfile-not-scanning-folder-for-new-files#latest
When this happens, the error log usually (but not always?) shows the following:
[JavaScript Error: "this is undefined" {file: "resource://gre/modules/osfile/osfile_shared_allthreads.jsm" line: 1265}]
However, when I right click on the pdf (in red), and select Manage Attachments/Rename Attachments, everything works as expected.
Happy to hear why I'm wrong, though.
https://zotero.org/support/getting_stuff_into_your_library
Zotero will also automatically retrieve metadata for PDFs when you drag them from your computer’s file system to Zotero (though, again, the best way to import is using the browser button from the publisher webpage).
Thank you in advance, and Joscha thanks for writing such a useful tool!
(I tried searching this forum post and could only find a similar discussion from 2012 where Joscha states "sorry, I don't have any plans to add the extraction of other annotation types right now..." at https://forums.zotero.org/discussion/5301/zotfile-advanced-pdf-management-for-zotero/p13).
Thank you for your reply. Does that mean you think Joscha (ZotFile Developer) would be open to incorporating code written by someone else to provide this functionality?
If so, I've tried looking through the source code a bit. I don't have much of a programming background, but I figured out at least how to edit and test the code from the github page.
I tried adding FreeText to the line var SUPPORTED_ANNOTS = ['Text','Highlight','Underline'] in the two places it appears (getPDFAnnotations.js line 23 and extract.js line 4) but that did not do the trick.
I don't fully understand the code or see what is limiting the extraction to underlines, highlights and popup comments. Honestly, I don't think I really have the programming skill to write this myself! Is there anyone else actively developing for ZotFile?
I recently realized zotfile is not keeping my folders updated as I add more references in. For example, I have a folder full of pdf's from journals. I drag and drop them into zotero, however no files are moved and no files are renamed. On top to this, I need to manually select all files in zotero, right click, and go rename in order for anything to be done. Even then - only files that were renamed were moved (some of the files metadata hasn't been picked up, so none of these were moved). I have quite a few pdfs and am constantly adding more in so it's getting crazy to try and keep everything together. Usually I use the connector on chrome to add references in but files havn't been syncing properly so I needed to resort to the drag and drop method.
I've had to go through my references multiple times now just to double check nothing got copied wrong. What can I do to fix this? Is this just an inherit problem with zotfile/zotero? I'll admit im a newb to zotero, so i'm hoping to learn what i'm doing wrong or what I can do to correct this. Thanks!
it is not clear why you are posting this in the zotfile thread. It seems what you describe is a problem with zotero, and it is not clear to me why you drop pdfs to a folder in the first instance. The way to go is to either:
-drop files directly into zotero, then right click and select "pdf metadata retrieval". You can select multiple pdfs in zotero and do the metadata retrieval for all of them in one go. But you should alway move files to zotero, not a folder.
I do not understand what you mean by "only files that were renamed were moved"
-Depending on how you get your pdfs in the first instance, most webpages where you download pdfs from, such as google scholar, or JSTOR have the option to directly download citation data and pdfs in one go into zotero. To do so, click on the yellow folder (if you are on a page with multiple items) or the blue page sign in the browser.
best
Is it possible to share with tablet PDFs that are stored in Group Libraries?
I've been trying but the option Send To Tablet does not apear... only in the personal collection.
https://forums.zotero.org/discussion/72734/zotfile-cannot-move-multiple-files-back-to-zotero-structure-at-once
I'm interested as this would help for using zotfile with group libraries. If the feature was slightly extended with a "move back to zotero storage" command rather than just running the standard move/rename command, even better - that would make it super easy to use linked attachments for most files in my personal library, then transfer them back to zotero storage before adding to a group library!
thanks
I'm very, very new to this, so I'm likely missing something basic. Any help available is much appreciated.
Thank you!
I am happy zotfile user and I am using frequently the feature to send the documents to my tablet remote directory.
Since about two weeks now, the transfer back does not work as before. Now, the transfer back does not include the annotations anymore and I just have the clean pdf as before.
Does anyone has an idea?
version => 5.0.52, platform => Win32, oscpu => Windows NT 10.0; WOW64, locale => en-US, appName => Zotero, appVersion => 5.0.52, extensions => Zotero LibreOffice Integration (5.0.14.SA.5.0.52, extension), Zotero Word for Windows Integration (5.0.8.SA.5.0.52, extension), ZotFile (5.0.9, extension)
Best Regards
Fabian