A command line tool for generating Anki cards with information from jisho.org (an online Japanese dictionary).
辞書・飲み込み → jisho nomikomi → dictionary swallowing
I wanted a cute name that's fun to say in my head. I like to imagine this program greedily scraping up data like a dubious little creature, and crunch-crunching it into a tidy little format.
To use the CLI, you can make a new virtualenv and then install the package. From a terminal within the project folder:
python -m venv .venv
. .venv/bin/activate
pip install --editable .
You can run any command with the option --help
for documentation.
token [OPTIONS] [TEXT]...
– identify the tokens in a Japanese text, and cache information for those you select.word [OPTIONS] [WORDS]...
– generate and cache information for each of the given words
library export [OPTIONS]
– export the cached library to a csv file, according to the format described in the config filelibrary delete [WORDS]...
– delete specified words from the librarylibrary example [OPTIONS] [WORDS]...
– generate examples for specified words; can select from a list of optionslibrary view
– view the current cached library of generated cards
config header
– configuring fields to be written in the Anki header file on export.
All fields have the flag option-rm
to remove the field from the header entirely, instead of updating values.config header columns [OPTIONS] [ORDER_FORMAT]...
– what each exported .csv column corresponds to- The option
-v
displays a list of all valid column field types. - Will regenerate library cache data with updated fields.
- The option
config header deck [TITLE]
– presets the deck to import into, if it existsconfig header tags [ALL_TAGS]...
– list of tags, separated by spaces, to be applied to every card on import
config senses
– configure the (maximum) number of senses of a word to include in a cardconfig view
– view the current config settings.