This collection of script allow users to convert the vocabulary builder dataset from Kindle into a Anki back and reverse cards deck.
- languages that are not English will fetch the translation to english and not their direct definition
- The API used in this project is Oxford Dictionary.
- Only the fields of definitions is supported.
You need to have python
installed. Run this to install the requirements
$ pip install -r requirements.txt
The definitions aren't included in the dataset from Kindle. Therefore, queries to a 3rd party that contains lexical definitions for words is Required. The supported API is the one from Oxford Dictionary.
- To get your credentials, visit this website : "https://developer.oxforddictionaries.com/"
- Click on Get Your API Key
- Choose your pricing based on personal preference.
- Fill in the form to complete your registration.
- Check your email for confirmation (could be in spam folder)
- Once you are registered, visit the website again
- Click on Credentials
- You should see a table with your business app name on the far left. Click on it.
- Write down your Application ID and one of your Application Keys somewhere.
- Plug your Kindle on your computer.
- Look for the file named
vocab.db
inside the storage of your Kindle. By default onUbuntu 20.04
, it should look something like this :/media/<user>/Kindle/system/vocabulary/vocab.db
- Make note of where it is located (have it in a opened file finder somewhere)
- Make sure you are at the root of this repo.
- Create a directory that will store the data and dumps of the scripts
$ mkdir data
- Simply run the script, provide the credentials as needed.
$ python python main.py --appid <your app_id> --key <you app_key> --vocab <path_to_vocab.db>
After the first run, the script will save all of the argument so you need not provided them again in future runs. You can modify them by
either modifying config.yaml
directly or providing them as an argument
$ python python main.py
- Open
data/vocab.csv
with Anki. - A window prompt should appear. Make sure that the card type and the field mapping should match as picture is shown.
- CLick Import and you should be done.
TODO