I made a script to convert notes to anki cards

Hey everyone, I made a script that allows notes to be converted to Anki cards. On subsequent runs, the script updates the cards as well. Take a look here to get started:


thanks hopefully we can integrate this more once we have plugins!

Any idea when the macOS will come out?

Most likely next week. Just need to make sure it can find the right anki profile folder for copying images over

1 Like

Great !!! Many thanks in advance.

Thank you very much, I tried, but it doesn’t display the code correctly.

Can you send me the original markdown with the code? I usually don’t have code in my markdown.

OK,here is my markdowntest.zip (233 Bytes)

Was this working before? Seems the conversion from md to html was correct, but Anki may be having trouble formatting the code. There’s an Anki add on that can format code blocks: https://ankiweb.net/shared/info/162313389

the conversion from md to html was wrong :anguished:

and the source code of html was like this

I see what you are saying. This happened because every new line in the html becomes a card. If we space the code properly on individual lines, it would not render the cards at all when you import it to Anki. I don’t have a proper solution for that right now.

I just don’t know if there would be anyway around that. Anki’s default import html uses every line as its own card. I don’t know if there’s anyway around it, with the script or not.

1 Like