View Single Post
Old 12-28-2014, 11:37 AM   #20
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,745
Karma: 24032915
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by mrevent View Post
With the Kindle Mate program , I wonder now as to whether there is/ can be built a script that looks up the words in a desktop dictionary application and append the definitions to the vocab builder words in the list.
If you know your way around a text editor, you could export the raw vocabulary data as a "|" delimited text file with a simple shell script and import it into a spreadsheet program for further processing.

Code:
#!/bin/sh

echo "lang|word|stem|usage|authors|title|category" > /private/var/root/Desktop/vocab.txt
sqlite3 /Volumes/Kindle/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;" >> /private/var/root/Desktop/vocab.txt
Before running the script, you'll need to change the user name in the Desktop path from root to your user name. If your Kindle isn't mounted as /Volumes/Kindle, you'll also need to change the database path.

To run the script open a Terminal window, drag & drop the shell script to the Terminal window and press Enter. (You'll obviously need to connect your Kindle to your Mac before running the script.)

If your Kindle is jailbroken, you could also use my quick and dirty Vocabulary Builder KUAL extension to export the Vocabulary data to the root folder of the Kindle.

As for the dictionary lookup, it might be implemented using a dictionary website API or querying a StarDict dictionary with sdcv. However, sdcv is a bit buggy and occasionally won't return results, even if the definition is in the dictionary. IIRC, there's also a Google Translate plugin for Anki.

What language combination(s) are you interested in?
Attached Files
File Type: zip export.sh.zip (344 Bytes, 358 views)
Doitsu is offline   Reply With Quote