After realising there was no library which could create flashcard decks with integrated media (which is very useful for spoken phrases and pronounciation when learning languages), I created this gem.
The gem provides a simple Ruby api to create flashcards and decks, as well as embed supported media formats (audio, images and video). Upon deciding to publish the library will package all referenced media, create an SQLite database to hold card + deck data and then package everything together in the format recognised by Anki. This required a mixture of reverse engineering, cross platform testing and schema investigation.
Project link: https://github.com/rkachowski/anki-rb