• Status Unconfirmed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.7.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by sbmull - 2011-01-07

FS#11864 - Working LUA Flashcard Program

I have written a basic flashcard program for LUA and am attaching source code and an example data file. I am using a Sansa Clip+ so YMMV. It uses ANKI format text files which are tab delimited txt. You may use UTF8 for the flashcard if you have your device set as such. To use, save the two included text files in the same directory and run. The card data file, Russian.txt, is a typically UTF8 encoded text file exported straight from ANKI with no modifications. I am using a size 8-fixed font in the screen shots.

Things I would like to see done:

1. Making the code more generic to run on all rockbox platforms.

2. If someone would tell me how to play vorbis files from LUA on a clip+, I might be able to implement playing the vocabulary words as they are displayed on the device. I am already parsing the audio file names from the database, but I need a function to play them.

3. If LUA/Rockbox supported SQLite, It might be possible to read and write native ANKI database with scheduling information. This would facilitate programming of advanced flashcard scheduling for efficient learning.

4. A menu to select different databases.

Looking forward to feedback!


I'm using Anki decks and I'd love to see you have some support for .ank files with SQlite, is there any chance in Rockbox? What about the menu with 4 buttons (Bad, Good, Easy, Very Easy?)

Thanks for ur work.

Thanks for the reply. Are you using the LUA program I wrote?

There was someone who proposed replacing the native rockbox database with SQlite and had a library built and working in rockbox; but it was C only and not LUA. The program would not be hard to write in C, but the LUA one works fine for me and I am not sure it would be worth the time and effort to link it to SQLite and program the scheduler algorithm. If a better programmer than me wanted to port it to c and use native anki databases, I'd be grateful ;).

I like to do my work on the desktop with anki and then export the cards that are giving me lots of trouble so I can review them on the go. So for me, the LUA program serves as a supplement to the desktop ANKI.

Best Regards!


Currently i have no rockbox device so I cannot try out.

I think that exporting the decks into ANKI Text tab separated files is ok too.

Do you implement the functionality to delay cards, fail cards, etc?

Best Regards.

At this point, it is simply a yes I know the card or no I do not. If you do not know the card it will review it after you go through the deck and continue till all the cards are know. Simple, but it works.


Available keyboard shortcuts


Task Details

Task Editing