wileyyugioh / zotmoov

Zotero plugin to automatically move attachments and link them
GNU General Public License v3.0
496 stars 6 forks source link

Filename does not get changed in directory folder according to customized filename format #68

Open holunderblute opened 1 day ago

holunderblute commented 1 day ago

I activated File Renaming in Zotero with a customized Filename Format and set the Settings in Zotmoov as recommended. Though the filename is not changed when added according to my customized filename BUT also does not keep the original filename when added. It is changed by parameters I don't understand. When I open the PDF in Zotero the filename in the tab is according to my preferences set in the customized filenameformat.

An example: I create an entry. Then I attach a PDF from my downloadfolder with the original filename: "Wimmer_Dieter_Wunderlich_Linguistische_Pragmatik_Rezension_1973.". Then the file gets added to my directory folder by zotmoov with the filename " 1973 - Linguistische Pragmatik. Hg. v. Dieter Wunderlich". In the tab when opening it in zotero the filename appears according to my customized filenameformat "Wimmer - 1973 - Linguistische Pragmatik. Hg. v. Dieter Wunderlich Rezension"

grafik

The customized filename format I use is:

{{ if creators count > 0 }} {{ if creators count > 2 }} {{ creators name="family" max="2" }} et al. {{ year prefix=" " }}{{ title prefix=" - " truncate="50" sentencecase="true" }} {{ else }} {{ creators name="family" }}{{ year prefix=" " }}{{ title prefix=" - " truncate="50" sentencecase="true" }} {{ endif }} {{ else }} {{ if editors count > 2 }} {{ editors name="family" max="2" }} et al. {{ year prefix=" " }}{{ title prefix=" - " truncate="50" sentencecase="true" }} {{ else }} {{ editors name="family" }}{{ year prefix=" " }}{{ title prefix=" - " truncate="50" sentencecase="true" }} {{ endif }} {{ endif }}

How can I make sure, that the filename is according to my filenamepreferences?

wileyyugioh commented 1 day ago

Your template is not correct–there's no count attribute. Why not use firstCreator instead? The website says it takes 1-2 authors or editors.

holunderblute commented 1 day ago

Ok wow, that was such an easy fix, that I feel quit stupid I had to ask. Thank you!

I misunderstood what "firstCreator" is for and used AI to help me create that template. I just tried it with the default file name template and it works now!