bkkhack / hacknights

A meta-repository for finding hack night birds-of-a-feather and tracking what we learn.
https://waffle.io/bkkhack/hacknights
15 stars 4 forks source link

Build an Anki database of Thai vocabulary using Python #177

Closed waf closed 7 years ago

waf commented 7 years ago

Anki is a free/open source app to aid memorization, using flash cards and spaced repetition.

I'm building several Anki decks full of Thai/English vocabulary. I have a large JSON file, and I'll be using Python to transform it into an Anki APKG database. The database is SQLite, but I'll be using an Anki API to actually build it.

I haven't used Python in a while, so I'll also be re-learning python as I go. ๐Ÿ‘€

ches commented 7 years ago

What's the source of your JSON data? I ought to brush off Anki and start studying with it again, motivation fell off largely because ofโ€ฆ getting data into it. So this could be a practical project :smile:

waf commented 7 years ago

The best word list I've been able to find is SEAlang's Thai website.

I converted that site to a huge JSON file, and next I'll need to figure out how to structure it into Anki decks in a non-overwhelming way.

Anki's desktop client is written in python, so I'm planning to import its python modules and use them to script the DB creation. Some "guy on the internet" posted this code that looks promising: http://superuser.com/a/1127023

waf commented 7 years ago

Thanks to ibotdotout for helping with this! We finished it. The source is here and a completed APKG file (pending some nicer styling) that can be imported into Anki is here: https://github.com/waf/anki-json/blob/master/dist/thai.apkg?raw=true