olofhaglund26 downloadsPushes flashcards from notes to Anki. The flashcards are bashed on code blocks annotated with flashcard.
NOTE: This is an early version and released early to catch hiccups in the distribution flow.
Obsidian plugin that renders flashcard code blocks as card previews and syncs them to Anki through AnkiConnect.
flashcard code blocks in Reading view and Live Preview.Anki/.{{Audio}} in preview with a play button that plays the referenced vault audio file.http://127.0.0.1:8765).Anki/ folder)Create one markdown file per note type under Anki/.
Only frontmatter is used.
Example: Anki/French Sentence.md
---
name: French Sentence
cards:
- name: With Sound Cue
front_template: |
{{french}}
<br>
{{Audio}}
back_template: |
{{FrontSide}}
<hr>
{{english}}
- name: Without Sound Cue
front_template: "{{french}}"
back_template: |
{{FrontSide}}
<br>
{{Audio}}
<hr>
{{english}}
style: |
.card {
font-family: Arial;
font-size: 20px;
text-align: center;
}
---
# French Sentence
This text is not read and can be used a comment to the note .
Notes:
{{...}} on one line.style and styling are both accepted.fields is omitted, fields are inferred from template placeholders.Put flashcards in normal notes using fenced code blocks:
deck: French::Sentences
note_type: French Sentence
fields:
- french
- english
- Audio
Meaning:
deck: target Anki deck (:: supports subdecks).note_type: note type name matching Anki/*.md name.fields: frontmatter keys for this note. If omitted, inferred from the note type templates.Values are read from the note's frontmatter.
Example note:
---
french: Ça va
english: How are you?
Audio: [[ca-va.wav]]
---
Audio supports:
[[file.wav]]![[file.wav]][label](file.wav)French/Sound Files/file.wav)Command: Sync flashcards to Anki
Per flashcard block:
Anki/*.md.AnkiConnect URLDefault deckDefault note typeDefault tagsAuto sync (currently config only)Sync scope (active-file, vault, folder)Sync folder (when scope is folder)Missing frontmatter key: add the key to the source note frontmatter or adjust fields.Audio not found: verify the file exists in the vault and link/path is valid.npm install
npm run dev
npm run build