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

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.

Hi, I have the same issue. I want to include empty lines in the answers to my flashcards because it would massively improve their readability. Have you found a solution /workaround ?

Hello everyone. I was wondering if I can get some context on what the point of the Obsidian File Link custom field is. I like that I can see the origin of the flash card in the Obsidian Context Field but I don’t know if I am missing something that will help my workflow.

Hello everyone. The plugin works great for any cards that I generate with some note types but not with others. I think it has to do with me filling in the Note Type Table in the plugin settings. I have created the custom fields now for all the different note types I have but the table doesn’t update. Does anybody else have this problem?

Okay I solved my issue by just creating a new Note type with the desired fields there from the beginning rather than tacked on. Somehow this allowed the original note type that I wanted to be updated with the relevant fields for the plugin settings as well

Hey guys. I know this plugin have some small issues and is abandoned at the moment. Anyway, it provides great functionality. I’d spent some time googling how to achieve better experience with what we have now. So, I want to share some helpful links to other new plugin users, who might come across similar issues to what I’ve met.

  1. Starting with Obsidian v.014.0 callout blocks (aka admonitions) became native. With it we can make our cards foldable in Obsidian so this improves note’s readability. How to make foldable flashcards you can read in this project’s issue.

  2. When using cards with custom syntax (regex), comes up the problem of adding card tags. I found that it might be solved by enabling this settings option
    image
    and adding tags in a card field, as it is shown in this example. Under suggested comment you can read how make a note more readable in view mode by adding HTML tags.
    There also exists a fix to this problem, but I haven’t tried it so far.

  3. One user made a useful fork which adds option to ignore certain files when scanning for flashcards. You can read how to install and use it in this issue’s comments.

2 Likes

I’m just getting started with creating Anki cards from Obsidian and am having trouble surveying the field of currently available plugins and understanding their features and pros and cons. Can someone here post some info or link me to info comparing anki-plugins for Obsidian?

I’m evaluating Obsidian_to_anki's ability to create Anki cards with minimal Anki syntax visible in my notes. My needs are:

  • I don’t want to see Anki syntax in my notes.
  • I will not be creating separate markdown files or sections for Anki notes/cards.
  • Instead, I want to adopt a simple, succinct note-formatting convention that results in card generation (mostly cloze deletion style, using md == highlight, and heading-q-and-a-style).
  • I want to be able to edit and refactor my notes without creating conflicts or orphaned/duplicate cards.

Most of my needs appear to be satisfied by this plugin, except…

  1. To delete cards with Obsidian_to_anki, is it really required to put DELETE preceding the inserted card ID, as described in the wiki?

    • Such manual deletion seems very problematic to me. I’m fine with one-way sync, but the tool should be able to resolve differences between notes/cards in anki and markdown. I realize this would be slower, but overall much time would be saved by not having to write markdown to perform deletes. I want to be able to delete cards in Anki through changing the markdown formatting to not use my convention anymore.
    • In addition, I’m not yet able to successfully delete a card/note which was generated by Obsidian_to_anki using the described DELETE syntax. Not sure what I’m doing wrong here, and nothing interesting or useful is popping up on the Obsidian console when I Scan Vault:
      ...<end of my note>
      
      DELETE 
      <!--ID: 1653975387291-->
      
  2. Is there a way to hide the inserted Card ID from view in Obsidian? EDIT: This comment answered this question. This is of lesser concern now knowing that card id’s are hidden by default in preview mode, and that I can mod the plugin to hide them in edit mode as well…

I’m massively new to all of this but an excited to get it working for me. Could anyone help me with making flashcards from bulleted lists? Would really really appreciate the help.
I can’t get Q: A: to work for some reason.

For example, from the note below. I would want a question/front as “short”, “medium”, “long”. With the answers/back to show the bulleted points

image

Can we use dataview table to extract keyword and translation? and feed it inside your plugin?