The purpose of this script is to create a simple anki deck from a block of japanese text so that you can create study material based on your context.
- Get all tokens of the block of text
- All individual kanji
- All words excluding individual kanji
- Fetch their meanings and readings
- Format the information (described in next section)
- Store it to a file (
anki.txt
)
A;「B」(C)
- A: the kanji or word
- B: the reading in hiragana
- C: the meaning in english
npm install
node index.js
- node.js https://nodejs.org/en
- axios https://github.com/axios/axios
- wachigaki https://socket.dev/npm/package/wakachigaki
- jisho.org https://jisho.org/api/v1/search/words?keyword=真実
- jisho's API will throttle after a few dozen simulataneous requests and cause the script to crash. To fix this
- Implement logic to handle throttling
- Break down input into smaller chunks
- Decrease the size of your input