ogallagher / quizcard-generator

Given a source document, generate quiz/flash cards
https://wordsearch.dreamhosters.com/quizcard-generator
MIT License
1 stars 0 forks source link

Use Anki tags to customize card render #32

Closed ogallagher closed 9 months ago

ogallagher commented 9 months ago

If the current note's tags are available within the DOM on render, then I can support variations of fill-blanks, as well as other layouts of the same information, without needing to create duplicate notes for associating to different card templates.

Initial render control tags:

Document

ogallagher commented 9 months ago

After looking at the anatomy of a rendered card in the web browser version, it does not look like the tags are available in any of the DOM elements by default. However, I can use the {{Tags}} variable to render the tags. The tags are rendered as a single plain string, tags delimited by spaces. This should work for me as long as the tags are placed in an identified container, and any quizgen tags never contain spaces.

ogallagher commented 9 months ago

Render control tags

Tags are an organizational concept already present in Anki, and the Quiz card generator (quizgen) includes them in its notes export in order to later quickly isolate notes within Anki that came from quizgen, and among them from what source texts they are. However, in addition to organizational tags, quizgen also uses card render control tags.

Render control tags serve as dynamic options to change how a note's cards are rendered. Below is a list of supported render control tags: