Created
March 21, 2016 18:04
-
-
Save mattslabs/68f45858c7fb3fbf312f to your computer and use it in GitHub Desktop.
Kindle vocab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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