This Python script help me add example sentences related to word on my learning cards, so I can learn the words better.
The hero behind this script is AnkiConnect - Anki addon to expose a remote API for controlling Anki.
The sentence examples retrieved from Dict.cn an online dictionary for looking up word definitions and examples.
Initially I use Youdao Dictionary as the source, thats why this repo name is youdao.
- Anki desktop application installed
- AnkiConnect addon installed and configured in your Anki application
- Setup python env if it necessary, and install the requirements.txt.
- Clone this repository to your local machine.
- Make sure your Anki desktop application is running.
- Take a look to the main.py script, update your AnkiConnect URL if necessary. (default is
http://127.0.0.1:8765
) - Use the provided functions to interact with your Anki collection programmatically.