DEV Community

Samim Pezeshki
Samim Pezeshki

Posted on • Originally published at Medium on

How I transfer my vocabs from my Kindle Paperwhite to Anki

I read a lot on my Kindle Paperwhite and it really amazes me how many words can homo sapiens invent. When I look up a new word in the dictionary and see the equivalent in my mother tongue I wonder where I have learned this rare word or even when was the last time I heard it. Despite that I totally comprehend the word and the concept behind. Homo sapiens are amazing.

I want to read uninterrupted, save new words for later and add them to my Anki deck so that I can review them on my phone in my free time, or at the gym.

This is how I do it.

As you know when you look up a word in Kindle it is automatically saved in something called the “Vocabulary Builder” which is accessible from the upper right menu on the device. The words are actually saved in an SQLite database on the device along with its surrounding sentence. If you connect the device via USB the database file is located at system/vocabulary/vocab.db.

Then I have a Python script to read this database, ask about the words’ meanings interactively and add them to an Anki deck. Occasionally I copy the database file to my PC and run the script below in terminal.

#!/bin/bash

KINDLE=~/Backup/vocab.db
COLLECTION=~/Documents/Anki/User\ 1/collection.anki2
DECK=Words

kindle2anki --kindle $KINDLE --collection $COLLECTION --deck $DECK --clipboard

I have put the script on AUR if you are of that tribe.

Top comments (0)