Szybet / sanki

small anki app rewritten for e-readers, with focus on InkBox support, written in Qt5 & C++
GNU General Public License v3.0
41 stars 1 forks source link

[FEATURE REQUEST] Import cards from "My Words" #6

Open brennier opened 8 months ago

brennier commented 8 months ago

Kobo devices have an experimental option called "My Words" that you can enable by adding MyWords=true to the [FeatureSettings] section of /.kobo/Kobo/Kobo eReader.conf.

This feature lets you save words that you look up in the dictionary. It also enables a new section in the nickelmenu for viewing these words in a single list. You can easily scroll through each word and see it's definition and where it appears in your book collection. Unfortunately, the is no way to review these words like there is on Kindle.

I was wondering if it would be possible to add an option to Sanki to allow importing words from the "My Words" list. This way, you won't need to use a computer at all. You can simply read normally, save words as you go using "My Words", and then review the words that you've saved using Sanki.

brennier commented 8 months ago

Oh, I forgot to mention. The words in the "My Words" list are saved in the SQL database /.kobo/KoboReader.sqlite under the table WordList.

Szybet commented 8 months ago

Wow, someone is interested in this app. I created a new release for both nickel and inkbox because of that, there were a few changes lately.

The reality is nickel is supported in this way: "Made to work once, hope it won't break!". My access to a nickel ereader is tiring to say at least - I don't use nickel at all. With that in mind I'm not interested in making this feature, sadly. To be clear I would be happy to accept a pull request of it.

For now I think you just need to copy this database to your PC, convert it somehow to a csv and import to anki.

brennier commented 8 months ago

No worries, I completely understand. For future readers, if you want to export the "My Words" data from your kobo device to a csv file, you can install sqlite3 and use this terminal command:

sqlite3 -csv $KOBOPATH/.kobo/KoboReader.sqlite "select * from WordList;" > my_words.csv

where $KOBOPATH is wherever you've mounted your kobo device. The database table contains the word, the book it was found in (but it's according to Kobo's internal naming system), the language of the dictionary that was used to look it up, and the time it was added to the word list.