Closed ohare93 closed 2 months ago
I'm currently looking into using brain-brew. My use case does involve only one way of generating decks: source to anki. With that I run into problems, because I can't build the decks without note_models which come from the CrowdAnki exports, correct? Is this the right issue I'am waiting for?
(Disclaimer: not the author of BrainBrew, but a happy user of it, at AUG.)
I think that you can write the note_model YAML(s) (one per note type), by hand, without it being too onerous, and in particular, I think that you can skip the required_fields_per_template
part?
For comparison, see an example BB starter note_model YAML or one of the AUG note_model YAMLs.
You need to list the fields (e.g. Front, Back) and the cards ("templates") that are generated (e.g. Front-to-back or Back-to-front), and write the HTML and CSS for the templates, but you'd need to do the latter anyway, while the former is lightweight "glue".
AFAICT if required_fields_per_template
is missing (as it is in the BB starter note models and in AUG) then the req
field in the generated CrowdAnki JSON will be empty (unlike would be the case if you created a CrowdAnki JSON export from Anki), but I don't think that's actually an issue at all, at least not for recent Anki versions (≳ 2.1.30?). AFAIR for earlier versions of Anki req
being missing might have lead to a delay in the cards being created (but they would get created once you tried reviewing them — i.e. for old Anki versions it might have lead to slight disorientation, but not serious bugs, and it has no adverse effects now).
FWIW I think that this issue could probably be closed (?).
(It might also be worth visiting the question of whether the req
field even needs to be in CrowdAnki...)
I'm currently looking into using brain-brew. My use case does involve only one way of generating decks: source to anki. With that I run into problems, because I can't build the decks without note_models which come from the CrowdAnki exports, correct? Is this the right issue I'am waiting for?
I would suggest you do a one time run of anki_to_source (the easiest way being though using the Init command) in order to generate the note models and other such required files :+1: then you can always run it however you like, and delete whatever is not necessary for yourself.
Note Models have a
req
dictionary that states which fields are required to be filled in to generate each Card Template. See here for a full explanation: https://github.com/ankidroid/Anki-Android/wiki/Database-StructureThis is a very long and useless dictionary for the purposes of having a Note Models in source control, and we should be able to just regenerate it when writing to CrowdAnki. Find where and how it is generated in Anki itself, and replicate that logic.
Example Note Model Yaml: