ZotFile user-defined wildcard renaming rules not being applied?

edited April 27, 2022
I am trying to use the user-defined wildcards to swap out characters in PDF filenames.

Here's what I've tried:

1. Found sample JSON for renaming rules and added the characters I wanted replaced (see below). Validated the JSON.

2. Took validated JSON and added it to zotfile.wildcards.user in about::config.

3. Saved it.

4. Added a new paper to Zotero, expecting the file to be renamed accordingly.

5. Enabled the "Remove special characters (diacritics) from filename" option in the Advanced Settings tab of ZotFile Preferences.

6. Checked filename, saw the characters I had expected to be swapped (e.g. ç instead of c). e.g. the filename was "Gonçalves et al. - 2010 - Methamphetamine-induced neuroinflammation and neur.pdf", when I expected it to be "Goncalves et al. - 2010 - Methamphetamine-induced neuroinflammation and neur.pdf"


Is there something else I need to do to make the wildcard rules be applied?



================
=== ZOTFILE PREFS ===
================
Here's a screenshot of my ZotFile Preferences with renaming preview of file above, where you can see that the wildcard character swap is not happening: https://www.dropbox.com/s/6gzofohlyhtnpq8/ZotFile Preferences, 2022-04-27.png?dl=0


=================
=== EXAMPLE PAPER ===
=================
Gonçalves, J., Baptista, S., Martins, T., Milhazes, N., Borges, F., Ribeiro, C. F., ... & Silva, A. P. (2010). Methamphetamine‐induced neuroinflammation and neuronal dysfunction in the mice hippocampus: preventive effect of indomethacin. European Journal of Neuroscience, 31(2), 315-326.


Paper PDF → https://d1wqtxts1xzle7.cloudfront.net/47888615/j.1460-9568.2009.07059.x20160808-9995-5ghz2q-libre.pdf?1470668638=&response-content-disposition=inline;+filename=Methamphetamine_induced_neuroinflammatio.pdf&Expires=1651049632&Signature=bkmO2oZfaxKJYBGiFn924HqDUkuuQaTLfg~Zu4fXEdDZQAD2uM7Sn9XX7G4D47ZcAfHhSJwS~NyFffI8SUIeB-gG4yHwAHlt3e05D96oOsRQ2t9MJ6SgS6R4oc8FkWa5VCt6iFb95T2iXiacrLrLFlI-1QInFiPi5Ky6jKjyso7miDpHozi42V358t0euU~pLyyalkpadTuFAu4vpNHGw9JxFffB7NuW-zpBer1pt0sZ09CXEt~7P5H~odmRYyaAuDhBCZAo2HJYnv7PvmREUB1DhYobnDiG0eiTYr8LzBwMEx1szPA01HTN9VsUKQGMFRO8fhfSJkij3b7ul9Eaig__&Key-Pair-Id=APKAJLOHF5GGSLRBV4ZA


==========================
=== USER-DEFINED WILDCARD JSON ===
==========================
Below is what I pasted into the extensions.zotfile.wildcards.user field in about::config.

```
{
"1": {
"default": {
"field": "author",
"operations": [{
"function": "replace",
"regex": "[ä]",
"replacement": "ae"
},
{
"function": "replace",
"regex": "[ö]",
"replacement": "oe"
},
{
"function": "replace",
"regex": "[ü]",
"replacement": "ue"
},
{
"function": "replace",
"regex": "[á]",
"replacement": "a"
},
{
"function": "replace",
"regex": "[ç]",
"replacement": "c"
},

{
"function": "replace",
"regex": "[å]",
"replacement": "a"
},

{
"function": "replace",
"regex": "[ã]",
"replacement": "a"
},

{
"function": "replace",
"regex": "[â]",
"replacement": "a"
},

{
"function": "replace",
"regex": "[é]",
"replacement": "e"
}
]
}
}
}
```
Sign In or Register to comment.