Anki <-> Org

Published on Nov 19, 2021, by Junji Zhi

This post is about how to sync notes between Org and Anki manually.

Background: In an effort to consolidate all my notes into *.org files, I need to deal with the old Anki decks.

Luckily, Anki supports exporting notes into plaintext files.

Anki export

If you want to import the same file, you need an add-on to generate the Node ID for each note.

Make sure Node ID field is added in the deck setup:

make sure Node ID field is added

Sample exported txt file:

9162f8c6-4942-11ec-8423-acde48001122 front 1 updated back 1 updated 98699bac-4942-11ec-8423-acde48001122 front 2 updated back 2 updated

With this plaintext file, you can use whatever you are comfortable to convert them into your org format.

For example, if you are using Org-Roam, the first note can be converted to:

:ID:       9162f8c6-4942-11ec-8423-acde48001122
#+title: front 1 updated
* Front
front 1 updated
* Back
back 1 updated

After you are done editing on org, it is a matter of converting them back to the plaintext files and importing them into Anki again:

import into anki

In this way, you can manually sync notes between Org and Anki.