Sqlite

Friday, September 4, 2026

The Indigo SQL Logger plugin can save device states to a local SQLite database that is stored in Indigo’s current version support directory. But where is that directory and how can our scripts access it agnostic of the current version of Indigo?

It turns out that the server exposes its log directory path:

indigo.server.getLogsFolderPath()

Then to get the path to the device state database:

import os

db_path = os.path.join(indigo.server.getLogsFolderPath(), 
    "indigo_history.sqlite")

And as an example:

Altering Anki’s revlog table, or how to recover your streak

Anki users are protective of their streak - the number of consecutive days they’ve done their reviews. Right now, for example, my streak is 621 days. So if you miss a day for whatever reason, not only do you have to deal with double the number of reviews, but you also deal with the emotional toll of having lost your streak.

You can lose your streak for one of several reasons. You could have simply been lazy. You may have forgotten that you didn’t do your Anki. Or travel across timezones put you in a situation where Anki’s clock and your clock differ. Others have described a procedure for resetting the computer’s clock as a way of recovering a lost streak. It apparently works though I haven’t tried it. Instead I’ll focus on a technique that involves working directly with the Anki database.