Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: How to avoid having commas in renamed files? #666

Open
andreifoldes opened this issue Nov 12, 2023 · 1 comment
Open

[Question]: How to avoid having commas in renamed files? #666

andreifoldes opened this issue Nov 12, 2023 · 1 comment

Comments

@andreifoldes
Copy link

Greetings,

I was wondering how to best instruct Zotfile to avoid having commas in renamed files?
Additionally I think this might be useful to be included in the default behavior...

@Dale-Muccignat
Copy link

Had a similar issue come up with apostrophes, whenever I'd open the filepath with another program it would get mad at me.

My solution was to create a custom wildcard in Edit -> preferences -> advanced -> config editor -> wildcards.user:

{"1": {"field": "title", "operations":[{"function":"titleFormated"},{"function":"replace","regex": "(')","replacement": "","flags": "g"}]}}

This uses the usual title formatting followed by a regex to replace any ' characters with nothing. Then in the zotfile preferences you can use %1 instead of %t for the renaming rules. If you replace ' with , it should give you the desired effect. I hope that helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants