I've created a quick & dirty
KUAL extension with 4 menu options that execute sqlite3 queries:
Hide all (moves
all words from Learning to Mastered)
Code:
sqlite3 /mnt/us/system/vocabulary/vocab.db "UPDATE WORDS SET category=100 WHERE category=0;"
Unhide all (moves
all words from Mastered to Learning)
Code:
sqlite3 /mnt/us/system/vocabulary/vocab.db "UPDATE WORDS SET category=0 WHERE category=100;"
Delete all (deletes
all words)
Code:
sqlite3 /mnt/us/system/vocabulary/vocab.db "DELETE FROM WORDS;"
sqlite3 /mnt/us/system/vocabulary/vocab.db "DELETE FROM LOOKUPS;"
sqlite3 /mnt/us/system/vocabulary/vocab.db "DELETE FROM DICT_INFO;"
sqlite3 /mnt/us/system/vocabulary/vocab.db "DELETE FROM BOOK_INFO;"
Export all (exports
all entries from the WORDS and LOOKUPS tables)
Code:
sqlite3 /mnt/us/system/vocabulary/vocab.db "SELECT * FROM WORDS where category=0;" > /mnt/us/unknown_words.txt
sqlite3 /mnt/us/system/vocabulary/vocab.db "SELECT * FROM WORDS where category=100;" > /mnt/us/known_words.txt
sqlite3 /mnt/us/system/vocabulary/vocab.db "SELECT * FROM LOOKUPS;" > /mnt/us/lookups.txt
To obtain a more SRS friendly layout, replace the code in
export.sh with the following two lines:
Code:
echo "lang|word|stem|usage|authors|title|category" > /mnt/us/vocab.txt
sqlite3 /mnt/us/system/vocabulary/vocab.db "SELECT WORDS.lang, word, stem, usage, authors, title, category FROM LOOKUPS JOIN WORDS on LOOKUPS.word_key=WORDS.id JOIN BOOK_INFO on LOOKUPS.book_key=BOOK_INFO.id;" >> /mnt/us/vocab.txt
This will generate the following output:
Code:
lang|word|stem|usage|authors|title|category
en|quaffed|quaff|The quarter-bottles of cheap wine had been quaffed [...]|Frederick Forsyth|The Veteran|0
(Unfortunately, Paperwhites don't store the actual dictionary definitions in vocab.db.)
The extension works fine on my PW2, however, since none of the sqlite3 queries are reversible and I'm not a programmer, users are strongly recommended to create a backup copy of
vocab.db (in /system/vocabulary/) before testing this KUAL extension.