Anki Forums

AnkiScript — more 'vanilla'-automation, fewer Add-Ons?

I’m stuck on 2.1.44 b/c some addons I have come to rely on have not/will not be updated…

Other addons, like the Migaku ones, have development cycles which may conflict with those of Anki.

I was thinking:

Some of my tasks could be automated if there was some sort of Anki scripting language:

  • select a ‘Saved Search’ from the card browser
  • apply an action (e.g. toggle suspend/bury)

For instance, the following could COMPLETELY REPLACE the addon ‘More Answer Buttons for New Cards’:

When learning new cards, I rate using 1-4 + some modifier key to apply flags.

Then, once or several times daily, the following ‘AnkiScript’ automatically runs in the background:

  • select all cards with blue (green/red/…) flags
  • ‘Set Due Date’, for instance ‘14-21!’
  • remove flags from cards


Anki’s scripting language is Python and add-ons are basically just fancy scripts. But I assume you would like an interface inside Anki that uses a simpler language and doesn’t require looking at the source code?
The amount of users who would use such a tool, but couldn’t be bothered to write their own add-on is probably quite small. So while I would like such a thing to exist, I don’t think it’s worth the huge effort it would take to build and maintain it.

What you intend to do is really quite simple. I can only encourage you to write a tiny add-on for it yourself. Just ask, if you need help.


Thanks for replying!

an interface inside Anki that uses a simpler language and doesn’t require looking at the source code

Yes, something for the noob — Python is a genus of constricting snakes, no?

And, even more important, something that will outlive major Anki updates, like 44 → 45 …

Anyway, 2.1.44 works fine for me, for the time being :wink:

I’ll try my best to wean myself off any dependence on addons, adapting my workflows.

That’d be hard to ensure.
On the other hand, a small add-on for a specific purpose that uses the designated hooks in Anki’s API is likely to run on a lot of future versions. And should ever an update be required, it would be very simple to do.