Skip to main content

Generate Anki decks from Japanese text

Project description

JANKIGEN

Generate Anki decks from Japanese text

Features

  • 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)
  • CLI only for now

Requirements

  • Python 3.8+ (Not tested with older versions)

Install

pip install jankigen

Example commands:

# Decks are generated in the same folder of the parsed file/directory

# Generate one anki deck 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>

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.2.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file jankigen-0.1.2.tar.gz.

File metadata

  • Download URL: jankigen-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for jankigen-0.1.2.tar.gz
Algorithm Hash digest
SHA256 541f816cd0552487b68f26f3d42c53f832a6c892fb1372095d7a62ba72668fa2
MD5 daf07917dd8f1a41a0001eea0e248846
BLAKE2b-256 5cb6b6c59b059f98d2b731901e6da82f1bf8b803acd6b8329702201185264e74

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page