Skip to content

Instantly share code, notes, and snippets.

@jmiserez
Created May 27, 2016 19:21
Show Gist options
  • Save jmiserez/e39753f3a31aa36bf00b0234c6fc6b53 to your computer and use it in GitHub Desktop.
Save jmiserez/e39753f3a31aa36bf00b0234c6fc6b53 to your computer and use it in GitHub Desktop.
Zotero ZotFile Renaming user json for setting: zotfile.wildcards.user. Simplifies series field (remove all non-words, e.g. "PLDI '14" -> "PLDI14") for journal articles and conference papers. Use like this: "{%a_}{%y_}{%1|%w_}{%t}" in ZotFile settings. Also see this bug report: https://github.com/jlegewie/zotfile/issues/170
{
"1":{
"default":{},
"journalArticle":{
"field":"series",
"operations":[
{
"function":"replace",
"regex":"\\W",
"replacement":"",
"flags":"g"
}
]
},
"conferencePaper":{
"field":"series",
"operations":[
{
"function":"replace",
"regex":"\\W",
"replacement":"",
"flags":"g"
}
]
}
}
}
@GrantRobertson
Copy link

see you are using many more features of the zotfile.wildcards.user configuration that are discussed on ZotFile.com. Where did you learn about all these options such as "function": "replace", "regex": " ", "replacement": "-" etcetera?

Is this something that is a fundamental part of JavaScript that I haven't learned about yet? Can you tell me where all this is documented?

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment