diff options
| author | David Schlachter <t480-debian-git@schlachter.ca> | 2026-01-08 11:14:39 -0500 |
|---|---|---|
| committer | David Schlachter <t480-debian-git@schlachter.ca> | 2026-01-08 11:14:39 -0500 |
| commit | 471df4d7a1654f35756a202e26a5d28815222012 (patch) | |
| tree | 743a150149b1c0083c125da4c7c0ca487b2d600f /README.md | |
| parent | 10f8e8c5ea5d3dd191d7e51682efc237d34cded4 (diff) | |
More flexible and better documentation
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -1,10 +1,42 @@ +# README + +This program provides a fast local dictionary, with the option to add any word & its definition to Anki. ## Getting started -You need a copy of https://kaikki.org/frwiktionary/raw-wiktextract-data.jsonl.gz +You need a copy of https://kaikki.org/frwiktionary/raw-wiktextract-data.jsonl.gz. Uncompress it to raw-wiktextract-data.jsonl. This is a structured dump of French wiktionary. + +To be able to add Anki cards, you need to install the `anki-connect` extension. You can find instructions to do so here: https://git.sr.ht/~foosoft/anki-connect When you're running this app, you'll also need to have Anki open (with the `anki-connect` plugin installed) in order to add new cards. + +Also from Anki, take note of the name of the Deck where you want to add new cards, and the `Type` of these cards (appears in the upper-left of the 'add new cards' dialog in Anki). + +(Note: currently this application assumes that your card type has two fields: "Front" and "Back". Eventually, this may be configurable. If the fields are called something else in your card type, you'll currently have to update the json tags for the `fields` struct in `add.go`.) + +With all this done, you can now run the app! The first time you run it, the app will build a SQLite database of words and definitions from the Wiktionary data, which will take a minute or two. From the root of this repository, you can use a command like this to start the app: + +``` +go run . -rawDictionary=raw-wiktextract-data.jsonl -deck="Français" -model="Basic-830ae" +``` + +## Usage + +``` +Usage of french-wiktionary-flashcards: + -deck string + Name of the deck where new Anki cards will be created. + -dictionary string + Path to the parsed dictionary data. This will be generated + from rawDictionary. (default "dictionary.sqlite3") + -model string + Name of the card type ('model') for new Anki cards. + -rawDictionary string + Path to the raw wiktionary data. You can get this by + downloading and unzipping + https://kaikki.org/frwiktionary/raw-wiktextract-data.jsonl.gz + (for French). (default "raw-wiktextract-data.jsonl") + +``` # TODO -- no hardcoded paths, or Anki info -- better setup instructions (intall plugin, set deck & card, properties, etc) - clear the screen after we finish the initial import, probably?
\ No newline at end of file |
