Skip to content

Instantly share code, notes, and snippets.

@mattslabs
Created March 21, 2016 18:04
Show Gist options
  • Save mattslabs/68f45858c7fb3fbf312f to your computer and use it in GitHub Desktop.
Save mattslabs/68f45858c7fb3fbf312f to your computer and use it in GitHub Desktop.
Kindle vocab
import sqlite3
conn = sqlite3.connect('/Users/tgg/Desktop/vocab.db')
c = conn.cursor()
cursor = conn.execute("SELECT word_key,usage FROM LOOKUPS")
file = open("words.txt", "w")
for row in cursor:
word = row[0]
usage = row[1]
save = "%s, %s" % (word, usage)
file.write(save)
file.close()
print "done";
conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment