~brhiggins/anki-cached-cloze

Anki addon - generate cloze strings as static field values
Renamed to 'cached cloze'
Add readme and license
Move cloze marker to config

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~brhiggins/anki-cached-cloze
read/write
git@git.sr.ht:~brhiggins/anki-cached-cloze

You can also use your local clone with git send-email.

#Anki cached cloze

Generate clozes as cached field values in Anki.

Anki's Cloze note type limits you to a single template. This plugin instead generates strings with cloze deletions as cached static values, storing them in indexed fields on the note. This allows you to easily mix clozes with other custom card templates on a single note type.

This is similar to the Cloze Anything and Cloze Overlapper plugins, but does not require any JavaScript or special note type.

This works with any regular note type, so can easily be added onto existing notes without disrupting anything.

#Instructions

  • Create the following fields on your note type
    • Original should be filled with your string, including cloze markers
    • FullText to store the original string with the cloze markers stripped
    • Cloze1, Cloze2, etc. to store the strings with the deletions

  • Click the SC button in the editor to generate the strings

  • Add as many new card templates as needed, with {{Cloze1}} etc on the front and {{FullText}} on the back

The other fields you see in the screenshot are just examples to show that you can mix cached clozes in with regular note types without needing to change anything. You can imagine that there are further templates which make use of these fields.

#Limitations

This plugin is very simple (less than 100 lines of code), and so is slightly limited.

There is no way to highlight the correct cloze on the back of the card the way that regular cloze cards do. All cloze templates share the same back field, which is just a regular field.

This is solved by adding different colours to each deletion in your original text, as shown in my screenshots. To be honest though, I actually find this quite a helpful way to highlight the discrete components of my cards. These colours need to be added manually, the plugin doesn't do it for you.