Mochitto / Markdown2Anki

A CLI tool and an apkg template to allow you to create flashcards from markdown and have a better experience while using anki for your studies. 🌸
105 stars 3 forks source link

So confusing. Missing obsidian vault name. #24

Open vinoff opened 7 months ago

vinoff commented 7 months ago

The README is so confusing guys. I will try to send a PR later, once I figure out how this works..

First off:

What constitutes a question, what constitutes an answer?

Secondly: I am getting this error:

❯ md2anki
Running Markdown2Anki v0.2.0 🌸

Checking for updates...
✨ Running the latest version!

Starting cards extraction
📦 Found 2 cards to process...
|--- ❌ Failed to process the card number 1...
|------- ERROR: Missing obsidian vault name.
|--- ❌ Failed to process the card number 2...
|------- ERROR: Missing obsidian vault name.
🙈 Failed to process 2 card/s...
❓ No cards created... Please check input the file.

I don't have obsidian, I am not interested in using Obsidian. I left the obsidian vault name empty.


Obsidian valut name = 
# !!! If left empty, Obsidian links will not work in your cards.
# The name of the obsidian vault where the input file is from.

This is my input.md file:

md2anki

So, what am I doing wrong?

Mochitto commented 4 months ago

Were you able to get the app to work? The formatting of your card was wrong; I suggest reading the Markdown formatting chapter. There are also examples of what a card should look like and the different outputs.

I'm sorry you found the README confusing; I'm more than happy to receive contributions to make it better :)


There is indeed a problem with leaving the valut empty... There is a guard in the obsidian links plugin that checks for that and I thought it wouldn't run if there was nothing to format using it, but apparently that's not the case. I will add the fix in the next version, in the meanwhile please add any placeholder value in the config.

Sorry about it; no idea how it slipped by during testing.

Mochitto commented 4 months ago

For potential contributors: I think this is an good first issue. Glancing at the code, the guard is this line.

The guard is necessary as people using obsidian links can get an error message, but likely needs to be moved somewhere else or handled differently. It would also be nice to add a test checking for this specific case.