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
2
  • Indeed :) that would be nice. But why not ask it as a feature request, builtin in the app?
    – Turion
    Commented Mar 6, 2015 at 15:43
  • I've been looking for something like this forever.
    – dgo
    Commented Mar 5, 2017 at 10:53

1 Answer 1

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 and acknowledge you have read our privacy policy.

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