Giter Site home page Giter Site logo

Comments (12)

larsoner avatar larsoner commented on September 27, 2024 1

I don't see a need to replace the builtin one, just do:

wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
codespell -D dictionary.txt ...

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

Is it really just being as simple as pullling https://github.com/lucasdemarchi/codespell/blob/master/codespell_lib/data/dictionary.txt down to /usr/lib/python3.6/site-packages/codespell_lib/data/dictionary.txt ?

from codespell.

lucasdemarchi avatar lucasdemarchi commented on September 27, 2024

if the format didn't change in a way that it depends on the feature from codespell itself, yes.

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

if the format didn't change in a way that it depends on the feature from codespell itself, yes.

Can codespell test for that ?

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

if the format didn't change in a way that it depends on the feature from codespell itself, yes.

@lucasdemarchi what is the context in which something like this can happen?

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

@thdot do you care to weigh in on this thread ?

from codespell.

thdot avatar thdot commented on September 27, 2024

I would like the feature.

I've thought about a implementation of this and here is my proposal:
We introduce a new catalog JSON file in the data directory which describes the format-version as well as all supplied dictionaries (currently we have only one, but I think we could have easily more dictionaries for different languages in the future), The catalog could look like

{
  "format-version": 1.0,
  "dictionaries": ["english.txt", "german.txt"]
}

codespell would then first download the catalog file, check if the format-version is supported, and then download the dictionary file(s). Thereby we can detect future format changes (for example to allow comments in the dictionary) and support the download of multiple files.

What do you think? @lucasdemarchi @larsoner @luzpaz

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

Interesting.
Though how does this address revisions to the dictionary in between major or minor releases of codespell ?

if the format didn't change in a way that it depends on the feature from codespell itself, yes.

Your idea of a format-version would take care of this

the multiple dictionary is also a cool idea...but each dictionary would need an admin to be in charge of it's typos, what is valid and what isn't.

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

I've gotten some feedback from users who have used codespell after I've demonstrated it to them, and they don't seem to get the same results when running it. This is because the dictionary.txt file gets updated for them only during new releases. This feature request would ensure that these end-users can stay current with upstream dictionary.txt

from codespell.

larsoner avatar larsoner commented on September 27, 2024

I think this is out of scope, use wget or something else to pull it from GitHub

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

If it's out of scope then I propose mentioning something in the docs for folks who want a workaround if we are not embedding this in to codespell.

Like a bash script that figures out where: codespell/codespell_lib/data/dictionary.txt is and then use curl or wget to grab https://github.com/codespell-project/codespell/blob/master/codespell_lib/data/dictionary.txt

from codespell.

luzpaz avatar luzpaz commented on September 27, 2024

#847

from codespell.

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.