Due Count Generator, an Add-on for Anki

DueCountGenerator (on GitHub) was a 2013 add-on I wrote in Python for the Anki SRS flash card software. The Add-on was intended for use with the (now discontinued) iPad app Status Board by Panic. Status Board was an app for displaying calendars, graphs, clocks, RSS Feeds, or any other kind of data in a dashboard like format. When I was studying Japanese several hours a day, I thought it would be cool to display my due review card counts for the day as well as how many I had completed recently in the app.

DueCountGenerator scrapes the AnkiWeb homepage to get a list of decks and due counts, which it then writes to a csv file for use by the Status Board App. The add-on file is added to the anki add-on API, and calls the generator when Anki is quit (after the sync to AnkiWeb is finished).

A second part of DueCountGenerator is another add-on for Anki which writes a deck collection report to a html file on program close. DueCountGenerator then parses this file to extract the number of reviewed cards for each of the last 30 days and writes the results to a JSON file encoding the information for a bar graph to display in Status Board.

Once set up initially, no extra work is required. When Anki is closed, DueCountGenerator runs and updates the csv and JSON files, which are written to a DropBox folder. When Status Board runs it fetches the files from DropBox and displays the information on the iPad.

The screenshot shows an example of how the information displayed in Status Board. The two bottom panes on the left were generated by DueCountGenerator.

NOTE: This add-on was written specifically for my own use with an old version of Anki, and as such is hard-coded in several locations for my file path. It was also written expecting a very particular format for the Anki deck collection report and AnkiWeb webpage. Attempting to run it on a modern version of Anki would at best not work, and at worst potentially corrupt your Anki decks. I currently have no plans to run or update it, as Status Board no longer works, and I am not currently using Anki on a daily basis.

Leave a Reply

Your email address will not be published. Required fields are marked *