Generate Anki decks from Japanese text
Project description
JANKIGEN
Generate Anki decks from Japanese text
Features
- CLI and GUI
- Generate decks from directories
- Generate deck from single text file
- Card order is shuffled to prevent text understanding (enabled by default)
- Kanji card and Word cards
- Kanji cards are ordered to be before corresponding word cards
- Custom user dictionaries
Limitations/Known issues
- It is sloooow (some library i'm using don't fit this purpose, there is quite a work to do for this)
Requirements
- Python 3.7+
Install
pip install jankigen
Example commands:
# Decks are generated in the same folder of the parsed file/directory
# Run GUI mode
jankigen
# Generate one anki deck for this file
jankigen text_file.txt
# Generate one anki deck for each file
jankigen directory_with_txts --disable_shuffle_card --enable_deck_per_text_file --disable_gen_global_deck_for_all_files
jankigen --help
usage: jankigen [-h] [--disable_shuffle_card [DISABLE_SHUFFLE_CARD]] [--enable_deck_per_text_file [ENABLE_DECK_PER_TEXT_FILE]]
[--disable_gen_global_deck_for_all_files [DISABLE_GEN_GLOBAL_DECK_FOR_ALL_FILES]]
[--user_dict USER_DICT] [--user_dict_en USER_DICT_EN]
path
Generate anki deck from file
positional arguments:
path File or directory with text files
optional arguments:
-h, --help show this help message and exit
--disable_shuffle_card [DISABLE_SHUFFLE_CARD]
Shuffles cards to prevent text understanding/spoiler
--enable_deck_per_text_file [ENABLE_DECK_PER_TEXT_FILE]
If searching in a directory, create an anki file for each text file found
--disable_gen_global_deck_for_all_files [DISABLE_GEN_GLOBAL_DECK_FOR_ALL_FILES]
Generate a global deck for all text files
--user_dict USER_DICT
Simplified janome dictionary. A csv file as <surface form>,<part-of-speech>,<reading>
--user_dict_en USER_DICT_EN
Match entries of user_dict with corresponding translations. <surface
form>,<reading>,<english_translation>
Build
python presetup.py
python setup.py sdist
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jankigen-0.1.7.tar.gz
(44.6 MB
view details)
File details
Details for the file jankigen-0.1.7.tar.gz.
File metadata
- Download URL: jankigen-0.1.7.tar.gz
- Upload date:
- Size: 44.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23b4323305f5e822fc3c77e8a6d1b482d0424d5501315d36d529276d1fff4e73
|
|
| MD5 |
8a8a57a1eae6c6f14a6ee89a878b1724
|
|
| BLAKE2b-256 |
9e9c58d8c8ac610c7f862a32fc6ad60d009025e10deca88aa5fea9c185215111
|