Transform a Obsidian markdown table into an Anki-card format using the plug-in Obsidian_to_Anki

As part of my language learning workflow, I intend to convert a markdown table into Anki card format using the Obsidian-to-Anki plugin. While I am unsure if there is an existing Python solution for this task, I have written a Bash script to accomplish it quickly.

You can find the illustration in the blog at Transform a table to an Anki-card format in Obsidian (update 20241031) – Grace HH Chuang,

and the script is available in my GitHub repository at Tools-in-Obsidian/src/toAnkiCard.sh at main · HHChuang/Tools-in-Obsidian · GitHub.

Have fun in both language learning and using the obsidian tools : )

Here is my proposed language learning workflow:

  1. input cards in Obsidian using markdown tables –>
  2. convert markdown tables to csv files using https://tableconvert.com/ –>
  3. import the csv file to Brainscape (or any flashcard platform)

1. This is far from being optimal experience because column width changes automatically while you type. I find that annoying. Other disadvantage is lack of list items in table cells (see this post). The most obvious thing you want is to press enter or tab to navigate in your table. Other thing you might want is spell checking which Obsidian offers. There are also some special use cases like creating flashcards that contain images or equations. I’m not sure how to do that in proper way.

2. The webtool itself contains ads which can be annoying if you use Custom Frames plugin. Other possibility is to use embeded user code to run the conversion (see Execute Code plugin).

3. In my opinion you should keep the original flash card data using portable CSV format. You can then use that CSV to create flashcards in any flashcard platform. As I said images or equations can be problem here but at least you can use external images syntax ![](..) and $$..$$ or $..$ math syntax.

Thank you for the suggestions! I agree that, even with the advanced table plugin, using a markdown table remains a challenge.

Using CSV is challenging for me because I want to trace back to the original resource. Essentially, each markdown file represents a specific learning material, such as a short story or podcast.

One way to adapt is by using the metadata property to link a local CSV file in each markdown note. The first challenge is that this approach introduces an extra step in the workflow, requiring users to open the CSV file. The second challenge arises when the number of markdown notes increases, making it difficult to manage them all effectively.