How to rename PDF files with short journalAbbreviation?
dstillman
Zotero Team
This discussion was created from comments split from: Now available: Zotero 7.
Upgrade Storage
For example, does the journal name “Proceedings of the National Academy of Sciences" can be abbreviated as "PNAS"?
{{ journalAbbreviation }}field can be used in the filename template. As long as your metadata contains this information, file renaming will use it.{{ publicationTitle replaceFrom="(\s|&|\(|\)|\bof\b|\bthe\b|\band\b|\B[a-zA-Z])" regexOpts="g" suffix="_" }}
However, how to abbreviate "Journal of Geophysical Research: Solid Earth" as "JGR-SE"?
It seems need implement replaceFrom and replaceTo many times.
For example:
{{ publicationTitle replaceFrom="[\:]*" replaceTo=" - " regexOpts="g" replaceFrom="(\s|&|\(|\)|\bof\b|\bthe\b|\band\b|\B[a-zA-Z])" replaceTo="" regexOpts="g" suffix="_" }}
However, it does not work.
Could you give me some suggestions to implement it ?
Thank you very much!
For your specific problem, wouldn’t it be more feasible to edit the item's metadata so that the Journal Abbreviation is stored in the Zotero database and use that as the basis for file renaming? Doing this within the template might go a bit beyond what the file renaming functionality was designed for.
eg. Journal of Geophysical Research: Solid Earth -> JGR-SE
Could you provide a function or fill this information in some metadata automatically?
Thanks a lot!