#+TITLE: kindle2anki
Description This is a Python script to help add words from Kindle to Anki.
Features
Import new words from vocabulary builder since last time, and asks for card back in the terminal. Words can be skipped (s) or you can quit at any words (q). =--clipboad= copies each word into clipboard so you can use it to look-up into any dictionary.
#+BEGIN_SRC shell $ ./kindle2anki.py --vocab-db '/run/media/Kindle/system/Vocabulary/vocab.db' --deck words --clipboard
[0%] Word: include Context: Your Kindle includes one or more dictionaries for each supported language. Enter card back:[q/s] #+END_SRC
Import new words from clippings since last time Do not ask for card back (to edit later in Anki) when =--ano-ask= is provided
#+BEGIN_SRC shell $ ./kindle2anki.py --clippings '/run/media/Kindle/documents/My Clippings.txt' --deck words --no-ask #+END_SRC
I have not tested translation (code is from https://github.com/rampage644/kindle-to-anki)
You can see my out-dated post [[https://dev.to/psamim/how-i-transfer-my-vocabs-from-my-kindle-paperwhite-to-anki-1f4d][How I transfer my vocabs from my Kindle Paperwhite to Anki]] . Arguments have changed since then.
Then install this script from [[https://aur.archlinux.org/packages/kindle2anki-git/][AUR]] or:
usage: kindle2anki.py [-h] [--vocab-db VOCAB_DB] [--clippings CLIPPINGS] [--deck DECK] [--update-timestamp] [--no-ask] [--clipboard] [-o OUT] [-m MEDIA_PATH] [--email EMAIL] [--pwd PWD] [--max-length MAX_LENGTH] [--verbose]
optional arguments: -h, --help show this help message and exit --vocab-db VOCAB_DB Path to Kindle vocab DB file (usually "/system/vocabulary/vocab.db" on Kindle). Provide this either this or --clippings --clippings CLIPPINGS Path to clippings (usually "/documents/My Clippings.txt" on Kindle) --deck DECK Anki deck name --update-timestamp Only update local timestamp to now and exit --no-ask Do not ask for card back in the command line --clipboard Copy each word to clipboard -o OUT, --out OUT CSV output filename to import into Anki, if not provided words are added to Anki using anki-connect -m MEDIA_PATH, --media-path MEDIA_PATH Where to store media files (sounds/images) from Lingualeo --email EMAIL LinguaLeo account email/login --pwd PWD LinguaLeo account password --max-length MAX_LENGTH Maximum length of words from clippings, to avoid importing big sentences --verbose Show debug messages #+END_SRC shell
Automatic Sync One can use udev rules to run this script automatically on Kindle connect. See https://github.com/seletskiy/runki#kindle--udev
Credits