Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imbryan/anki-kanji-cards
Generate kanji cards for Anki
https://github.com/imbryan/anki-kanji-cards
anki anki-cards jisho kanji learning-japanese python3
Last synced: about 1 month ago
JSON representation
Generate kanji cards for Anki
- Host: GitHub
- URL: https://github.com/imbryan/anki-kanji-cards
- Owner: imbryan
- Created: 2024-05-18T03:28:05.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-06-02T01:38:10.000Z (8 months ago)
- Last Synced: 2024-10-31T05:21:26.807Z (3 months ago)
- Topics: anki, anki-cards, jisho, kanji, learning-japanese, python3
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Anki Kanji Cards
This is a CLI script that generates Anki cards for a given list of kanji.## Usage
Install dependencies:
```
pip install -r requirements.txt
```Run script:
```
python kanji_cards.py [-d file_name] [--jlpt]
```> **path_to_kanji_file** is the relative path to a text file containing your kanji list. The script will ask you to specify how the kanji are separated. Personally, I copied kanji from [nihongo-pro.com](https://www.nihongo-pro.com/kanji-pal/list/jlpt) into a text file.
> **path_to_output_file** is the relative path (and name) of the file that will be created to contain your cards.
> **-d file_name** (optional) is the relative path to your current deck, exported (in Anki Notes format). This is only used in a comparison operation to avoid creating duplicate cards.
> **--jlpt** (optional) gets the JLPT grade and puts it in the Anki tags field for each kanji. WARNING: this option doubles the amount of requests you make due to a bug in a dependency (see "NOTE ON JLPT OPTION" in code).
You can create a `.env` file to configure default headers:
```
HEADERS=""
TERM=""
DEFINITION=""
```> **HEADERS** is your comma-separated list of headers. **TERM** is the header corresponding to the term. **DEFINITION** is the header corresponding to the definition.
## Acknowledgements
This script makes use of the [jisho-api](https://github.com/pedroallenrevez/jisho-api) project, which scrapes [jisho.org](https://jisho.org) for data.