12

Anki is a flashcards app, for instance to memorize obscure vim tricks.

Sometimes I want to quickly search a fact I don't remember, without having to open the Anki GUI.

Is there a script I could use for this?

Requirements:

  • Command-line
  • No configuration needed, should find the SQLite file itself
  • Search all fields, output all fields
  • Open source
  • Indeed :) that would be nice. But why not ask it as a feature request, builtin in the app? – Turion Mar 6 '15 at 15:43
  • I've been looking for something like this forever. – dgo Mar 5 '17 at 10:53
3

Since anki2 files are sqlite-based, you may try my filegrep script. (It needs file2txt and sqlite3 as helpers).

Examples:

filegrep ubuntu *.sqlite
filegrep ".*linux" *.anki2
filegrep -r "keyword" path/to/databasedir

You can use most of the classic grep switches with it.

The output will be in SQL, which you may filter with other tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.