Giter Club home page Giter Club logo

Comments (6)

jlegewie avatar jlegewie commented on June 4, 2024

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.

wshanks avatar wshanks commented on June 4, 2024

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.

jlegewie avatar jlegewie commented on June 4, 2024

I think that would be more consistent...

from zotfile.

herrsimon avatar herrsimon commented on June 4, 2024

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.

jlegewie avatar jlegewie commented on June 4, 2024

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.

jlegewie avatar jlegewie commented on June 4, 2024

I am closing this because it should be possible with herrsimon's pull request...

from zotfile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.