wileyyugioh / zotmoov

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

conditional folder #48

Open causalcat opened 1 month ago

causalcat commented 1 month ago

Hi, I would like some help to use the conditional moving to a specific folder. Specifically, I want to have the files moved to a folder according to the first author's last name. But if this is not available I want to move to a folder named "unspecified". Can you please tell me what I should write to the section "subdirectory string default" to achieve this?

Thanks in advance!

wileyyugioh commented 1 month ago

Unfortunately I don't think that's possible currently in ZotMoov. The conditional stuff only works with wildcards.

If you use {%a} then if the author's last name exists it will put it in ZotMoov/AUTHOR/ and if the author doesn't exist then it would just put it in the base folder ZotMoov/.

You can also try {%a | %Y} which will put it in a folder that is the year the file is added to Zotero: ZotMoov/2024/

wileyyugioh commented 1 month ago

Please try prerelease 1.1.15 which adds the wildcard %U. You can change the "undefined" string to "unspecified" by modifying the hidden preference extensions.zotmoov.undefined_str.