Closed kerrickstaley closed 4 years ago
Isn't it just a matter of type: 1
in models?
Yes, it should be. But ideally I want to add a nice-to-use interface for creating Cloze notes.
(Pull requests welcome!)
I worked on this a bit and it's more than just type: 1 in models. Each cloze note can generate multiple cards. When generating Cards from a cloze Note, first the Model's template/qfmt field needs to be scanned to find fields that are marked with "cloze:" prefix. Then each of these fields in the Note needs to be scanned to find "cN::" cloze references. A Card needs to be created for each unique "N" ordinal cloze reference. Here's a working example that extends genanki.Note and genanki.Card to support cloze notes. https://gist.github.com/mtherieau/356445199db23daa776010710c68852a (fyi: I lifted the cloze regexes from anki)
Fixed in https://github.com/kerrickstaley/genanki/pull/37, won't get around to releasing it until later though.
Cloze notes are great, let's do that.