jlegewie / zotfile

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 PDF annotations.
3.99k stars 281 forks source link

Suggestion: add original filename to renaming rule fields #296

Open r0bis opened 7 years ago

r0bis commented 7 years ago

Thank you very much for this fantastic add-on. It is very good.

Would it be difficult to add original filename as a possible field to the attachment renaming, say as {%o}. Use case would be this:

I have an article - it consists of several parts and I want to keep them separate; however they all belong to the same article - therefore I want only one entry in Zotero. Names could be like this:

My_article_name.pdf
Abstract.pdf
Diagram_1.pdf
Diagram_2.pdf
Table_1.pdf
Slide_1.pdf

If I had the option to add original filename, it would create a nice series of attachments, all belonging to the same article. All I would have to do after I add the main text (the first list item) of the article would be to change the rules in the preferences by adding {%o} and then I can add the other attachments. Or if I choose to name the first item simply as main.pdf I would not even need to change renaming preferences. I presently achieve similar results via the user input field, but that is a manual entry every time and also creates a whitespace between the name and the user input, which I do not like in filenames.

I think there could be many use cases when one wants one bibliographic item to refer to, but to have multiple attachments that each may have a different use case (e.g. email just the table to the editor etc.). I am very happy to use user input field, but I thought that adding the original filename field might be an easy and useful addition that expands use of Zotero as an electronic library manager.

With best regards, Robert

jlegewie commented 7 years ago

What is about the extensions.zotfile.disable_renaming option? Read more here: http://zotfile.com/#hidden-options

r0bis commented 7 years ago

Thanks, I am aware one can disable renaming, but renaming is very useful. The idea is to use filename as one field - for example with that I have an article consisting of main item, abstract, 3 diagrams - it would be great to have Zotfile rename them like: `

jlegewie commented 7 years ago

Makes sense and shouldn't be too hard so I will label it as an enhancement. Probably won't get to it anytime soon though

r0bis commented 7 years ago

No problem and good luck with the zotfile project; it is much needed.

bit-hug commented 4 years ago

Is there any update on this feature? I use it in BibDesk for autofiling and it would be very useful in zotfile 😄

galantra commented 3 years ago

This feature would be magnificent! Some books that I have are downloaded in the form of multiple PDFs, separated according to chapter. In Zotero, this creates dozens of attachments like 12345678910-123 (ISBN-chapterpage).

This means I cannot identify the work when I see the filename outside of Zotero (e.g. DocFetcher), unless I remember part of the ISBN.

I've thought of a workaround: Select the most important books, rename the attached PDFs with an external tool, and modify the filenames in Zotero via the Zutilo addon.

I've also considered creating a custom wildcard. I looked through https://api.zotero.org/itemFields?pprint=1 and it seems like it cannot be done because the filename is not a field. Also, it lists only the fields of items, not of attachments (can attachments have fields? Not sure).

soumitrakp commented 3 years ago

I would like to have this requested feature.

jleaves commented 2 years ago

Any update on this? It'd be so great to have this feature.