⭔ Blog⧉ Notes⏣ About@ Contact ⟐ Online Course  |

How To Sync Obsidian With Anki Automatically / Plugin Walkthrough

December 16, 2020

In this video I break down the process of syncing and creating anki cards from Obsidian, with a great Obsidian Community plugin.

Check out the Obsidian_to_Anki GitHub page, it has excellent instructions on how to set things up.


Follow the steps to add AnkiConnect

These steps are clearly explained in the video tutorial above.


In order to keep things in this format

this is the front of the card #flashcard
this is the back

we need to add this line of regular expression into the plug in settings.

((?:[^\n][\n]?)+) #flashcard ?\n*((?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))+)

Where to put this line?

  1. Open Obsidian settings

  2. Scroll down to the "Plugin Options" section

  3. Find "Obsidian_to_Plugin" settings

  4. In the Note type settings, open the dropdown that says "Note type table"

  5. Go to the first line that says basic

  6. Paste this line

((?:[^\n][\n]?)+) #flashcard ?\n*((?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))+)
  1. Refresh obsidian

  2. Done

you can find more info about this format here


Remember to determine the deck name at the beginning of your file

TARGET DECK: Esperanto

Now you should be able to create new cards like this:

this is the front of the card #flashcard
this is the back

open the command palette search "Obsidian_to_Anki: Scan Vault"

Keep Anki open the whole time while doing this otherwise it won't work.

once everything is good your note should have an automatic ID created like this:

<!--ID: 1234567890123-->

Your final note should look like this

TARGET DECK: Esperanto
this is the front of the card #flashcard
this is the back
<!--ID: 1234567890123-->

Deleting cards

IF you want to delete a card, you must write

DELETE above the ID

like this

this is the front of the card #flashcard
this is the back

open the command palette write "Obsidian_to_Anki: Scan Vault"

It should look like this:

this is the front of the card #flashcard
this is the back

now you can safely delete the card's text.


This plugin is still in it's early stages, if you are feeling adventurous you can try the python script found in the same Obsidian_to_Anki GitHub page.

The python script requires more setup, I used it in Linux and it worked great.

But I do hope to see this Obsidian Community Plugin grow and become even easier to use.

Key sections of the wiki page

The documentation on this plugin is great, here are some of the most useful parts I found:

Deck Formatting

Note Formatting

Formats Regex

Example Note


Learn More

Become an Obsidian power user with my course, my goal is to teach everything I know about Obsidian there.

check out my Obsidian Course


Santi Younger

Santi Younger

Professional Notetaker, Jack Of All Trades, Philosopher.
 
----------------------------
© 2021
Privacy Policy