Obsidian_to_Anki v3.4.0 - a feature-rich plugin that allows you to add notes from Obsidian to Anki

Found the issue already reported in github with a workaround: Renaming note-types breaks them · Issue #177 · Pseudonium/Obsidian_to_Anki · GitHub

2 Likes

It is a weird bug, as it works sometimes but doesn’t most of the times

Hey! Is there any regex that supports empty line? EG:

This is the question? #flashcard
This line is included

This line is not included when using any regex;

I want to include these lines aswell

And its the similar story with Q/A regex. So i searched the github issues, and found this regex that includes empty lines and stops when 2 empty lines are found:
^Q: ((?:[^\n][\n]?)+)\n+A: ([\s\S]*?(?=\n{3,}))
But the problem with that is when the Question/answer is modified, it creates a new card instead of updating the new one.

Does anyone have a regex that works with empty lines?

Is using hidden paragraph supported? The below format works, but will it be supported in the future, I don’t want to redo everything after a minor update breaks everything.

<p hidden>
START
Basic
question
Back: </p>

Answer

<p hidden>
END</p>

Thus only “Answer” is visible in preview mode.

1 Like

I try to setup Obsidian to Anki , I am on Linux, It says that it connect without a problem, but when I want to add dummy card

# Overall point

## Subheading 1

## Subheading 2

START
Basic
This is a test.
Back: Test successful!
Tags: Testing
END

the extension says that it connects and is adding all media but nothing appears in the anki deck that I choose in the settings. This might be a bug or I am doing something wrong? I am on anki 2.1.42

I like the hidden approach. I created a css snippet which will probably also work in the future CSS for Obsidian to Anki

Is there a way to tell this plugin not update certain fields to anki? Or make it updated from anki so that when I sync agian it doesn’t delete all the things I’ve added to that note in anki?
RIght know the only way I can think of, is to delete the note in obsidian after the first sync

have you solved the problem? I’m having the same one with Windows

UPDATE: The note type in my version of Anki (2.1.43 (0fbae6bc)⁩ is not <, but is <<Basic (optional reverse order)>>. If I use that value, the process works.

START
Basic (optional reversed card)
Front message
Back:
Back message
END


I’m having the same problem on Mac

1 Like

Is there a regex for the normal header paragraph style: ^#+(.+)\n*((?:\n(?:^[^\n#].{0,2}$|^[^\n#].{3}(?<!<!–).*))+), but with multiline paragraph (spaces between lines)?

I am using the regex code(cloze paragraph style) to deal with cloze deletion in obsidian.
The regex code for basic cloze cards are very simple which even works with only “{ }”.
((?:.+\n)*(?:.*{.*)(?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)

I have made a separate card in Anki for “cloze answer typing” where answer needs to be typed.
But I am unable to tweak the code to work with the card.

The code works fine if I use them for only 1 card type either basic cloze or cloze answer typing. But I want both of the card types to work with regex code.

Can anybody help me in tweaking the code so that I the “cloze typing” will also work ?
e.g. "x{cloze information}x"
where x is any symbol or if possible any letter.

@Pseudonium I have the same problem as @sutzig and @sirredcrosse . Some time ago, I created some cards in Obsidian, and it worked without problems. Today I wanted to add more cards, but they weren’t added to my Anki deck, without an error. It’s interesting, though, that changing old existing cards works: after the click on the Anki button they are updated in Anki immediately. Any idea what I could try?

@sutzig , @sirredcrosse : did you find a solution?

IIRC, I was entering the regex in the wrong box altogether. I don’t currently have Obsidian on the computer I’m typing this post from [new desktop; it’s on my laptop] but if I get back to my laptop, I’ll let you know if I did in fact find a good solution. I hopped through a couple other options and know I eventually came to one that gave me what I wanted, but I can’t recall if it was with this particular plugin.

Hi

I wonder if there is a way to auto reset editing card on obsidian ?

For example, I edit a card and when I sync it to anki, this card will be reset to study it directly.

Is someone already use anki with admonition style ?

I’m trying to escape with regex something like this :

??? ad-question Q: Title goes here?

A: content1

--- admonition

I think there is better inline admonition now.

> [!question: What is this?]
> Answer

You can hit and try and learn on regex101.com

Use a regex for a very similar structure to what you have, and try to modify it.
I used to do the same. For example if there is a regex for Q: What is this?.. then you can simply choose it and prepend the extra stuff. Something like that.

I don’t use it anymore. I shifted to Spaced Repetition plugin since this tool wasn’t maintained. :frowning:

Hi

Thank for your message.

The problem with this code is that you can’t add image don’t you ?
Or sync with anki after that.

I know that a space repetition exist in obsidian but I use a lot of fonction of anki so I can’t use obsidian alone sadly.

Images worked fine as far as I remember!!

It looks like this project is basically dead as it has not been updated in over a year.
Does anyone know whether there is a maintained fork of this somewhere?

For the time being, GitHub - reuseman/flashcards-obsidian: 🎴 An Anki plugin for Obsidian.md seems like the closest maintained alternative, although I prefer Pseudonium’s plugin for its high level of customization.

The Spaced Repetition plugin does not sync with Anki, which would make all created flashcards useless if/when it gets discontinued.

Definitely agree. It seems to be not maintained.