Bookshelf micro-module that shows random vocabulary words

Been using KOReader's Vocabulary Builder for a while to save words I look up while reading, but I kept forgetting to actually review them. So I made a little micro-module for Bookshelf that puts a random word with its dictionary definition right on the home screen.

It reads from your Vocabulary Builder SQLite db, looks up each word via sdcv (StarDict), and shows:

- The word (big, bold)

- Word type (noun, verb, etc.)

- 1-3 definitions

Tap to get a different word. Long-press to tweak how many definitions to show, toggle the word type, or adjust font size.

Performance-wise, it only calls sdcv once per session — all uncached words are batched into a single command at module start. Definitions are cached to a JSON file, so taps are instant and there's no risk of OOM from forking sdcv multiple times.

It's in early development — tested on the emulator and my Kobo Elipsa 2E with a Spanish dictionary. YMMV with other languages/dictionaries, but it should work with any StarDict dictionary you have installed.

Everything (code, docs, architecture) was generated by AI agents under my direction.Kind of a fun experiment in human-AI collaboration for a practical e-reader tool.

https://preview.redd.it/u4vdokipedch1.jpg?width=3024&format=pjpg&auto=webp&s=401f4226eaff9929e33b7ad04da98c4cf84c2a53

https://preview.redd.it/no21vjipedch1.jpg?width=3024&format=pjpg&auto=webp&s=4055ef27dc69d3f104baa2363400ea5fd318f94d

https://preview.redd.it/pr1wgjipedch1.jpg?width=3024&format=pjpg&auto=webp&s=913cf476bd27d69773113229666ba2340a813847

Repo: https://github.com/Vivic87/vocab_word

Curious if anyone else finds this useful and happy to take suggestions.

reddit.com
u/VIvic87 — 3 months ago