Comments (6)
It sounds like an interesting feature but I simply don't have time to work on any additional features for now. I am happy to integrate contributions from other people, which is quite some work itself. So if you send a pull request, I am happy to make sure that gets implemented. My idea would be to use a JSON string for custom substitution. Here is an example with three substitutions (!@#$%{}
gets replaced by _
, ä
by ae
etc):
{
'!@#$%{}': '_',
'ä':'ae',
'ü':'ue'
}
It's easy to loop through these JSON objects to do all the defined substitutions. In FF, they can be saved as a string preference like this "{'!@#$%{}': '_', 'ä':'ae', 'ü':'ue'}"
and there is a simple command, which transfers the string to a js object.
from zotfile.
Okay, cool, I will try that out when I get a chance. That's nicer than what I had been thinking (only one option for the substitution rather than a set of rules).
By the way, how do you feel about the substitution working on subfolders as well as file names? This would mean either putting it in replaceWildcard()
or putting it into both getLocation()
and getFilename()
. I had wanted remove periods and replace blanks to work on subfolders, but if this custom substitution worked on subfolders, I could just replicate their behavior with it and they could be left alone.
from zotfile.
I think that would be more consistent...
from zotfile.
Hello willsALMANJ,
all of your requests are possible using my proposed 'wildcard modifiers' (see pull request). If they are adopted, I'd have to code in an escaping mechanism (easy to do), as the curly braces you want to replace are currently used to delimit argument groups. Apart from this, everything else is implemented.
Best wishes,
Simon
from zotfile.
wills, I saw that your nice pull request about relative paths to linked attachments is going to make it in Zotero 3.1. I opened a zotfile ticket about that #78. Can you comment on how zotfile can best support the new feature in 3.1? Does anything break?
from zotfile.
I am closing this because it should be possible with herrsimon's pull request...
from zotfile.
Related Issues (20)
- Renaming via Zotfile causes persistent pop-ups that start piling up HOT 2
- Adding PDF sometimes not getting table of contents_
- Zotero 6.0.23, ZotFile v 5.1.2 group folder files not moved
- Renaming rules with number of words limitation instead of number of characters
- Subfolder by Collection only? (not sub-collections) HOT 2
- Questions about whether the plugin can currently run
- Compatibility with build in annotation feature
- Error regarding attachment note missing
- Zotero 7 support HOT 17
- zotfile cannot automatically move new items to my desired folder
- Fails to extract TOC on PDF
- Zotfile download flagged as "corrupt" HOT 3
- Additional templates for renaming files.
- A suggestion for file renaming and moving
- `%b` for citation key in renaming format no longer works HOT 11
- [Feature Idea] Add support for extracting link for the cloud location of the file
- "Attach new file" does not work if the PDF is open in another application
- Incomplete name after using rename and move by zotero rule
- [Question]: How to avoid having commas in renamed files? HOT 1
- Rename linked file in arbitrary directory, without changing location
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zotfile.