Index notes externally

I wonder if it can be made possible to index cards in a search program like DocFetcher.

I remember reading that an .apkg file is just a .zip file with a different filetype extension. In DocFetcher, it is possible to specify the filetype extensions that should be regarded as archives (such as .zip).

I have renamed a .apkg file and a .colpkg file to .zip. Both contain a file named “collection.anki2” and a file named “media”.

I then extracted the .anki2 file from the .zip directory and renamed it to .zip. This however is not a valid .zip.

This means that Anki collections are not easily searchable with DocFetcher.

Is there any way how it is possible to index and search through an Anki collection with an external program?

I doubt that there’s a software for this at the moment.

External search tools like DocFetcher or Recoll need to know how the anki database works so that they can meaningfully index it. So someone would have to program/write a small tool (filter).

 

possible workaround: There are several print or export plugins. Maybe one of those can be used so that you have something the search tool understands?

 
if you like the command line: Maybe have a look at ankiconnect that has findNotes and notesInfo that you could built into a custom command line search script. There are also some command line scripts that can modify or query the anki database on github.

2 Likes