Improve speed of change of note type

AnkiWeb addon 115825506

Speeds up note type changes by rendering card fields in a single pass, removing the hundred-field limit and altering some generated-card results.
AI-generated summary; may contain mistakes.

note-managementcard-templatesobsolete

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
3 (πŸ‘ 3 Β· πŸ‘Ž 0)
Updated
2019-03-05
Anki versions
<=2.1.19
Description language
en

Maintenance

abandoned

  • Last update or commit was 2251 days before the snapshot (2020-08-02).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.192019-03-05
History across monthly snapshots

Loading…

Similar addons

Merge Notes

Merge multiple selected notes into one new note with field mapping, separators, cloze removal, tag preservation, optional original deletion, history transfer, undo, and logs.

schedulingnote-managementformattingcard-templates

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 ⭐ 2 Anki 2.1.1~ Updated 2026-06-06
AnkiOCR

Generates searchable OCR text from images in Anki notes, supporting batch processing, multiple languages, and easy removal or output to a separate field.

card-creationnote-managementsearchbeta

Rating 45 πŸ‘ 42 Β· πŸ‘Ž 3 ⭐ 19 Updated 2021-09-19

README

Improve rendering

Changing a model may be a really long process. This can be partially solved using add-on ()[] (full disclosure: I also wrote it). As an example, I've got a note type with more than a hundred field and card type. Changing it without this add-on takes 7 minutes and a half while using this add-on, it takes only 3 minutes.

Warning

This change the result of the card generated in a few case. Most of them should either be improvement, or not occur in normal use of anki.

Field name inside field.

In a basic card, if you write "{{Back}}" in the Front field, you'll see the content of the back field where you should see the front field. This is because {{Back}} is found in the generated card and anki assumes it must be replaced by the value of the Back field.

This does not occur anymore. This add-ons ensure anki does all replacement in a single pass, instead of doing it iteratively. On a technical side, this is what allow the running time to be linear in the number of field instance instead of quadratic (product of length and of number of distinct field).

More than a hundred field.

By default, anki allows at most a hundred field by card. This add-on remove this restriction. Thanks to the time improvement, this is actually not an important limit anymore.

Badly formed card type

A template such as

{{#Front}}{{#Back}} {{Front}}{{Back}}{{/Front}} {{/Back}}

is theoretically invalid. Indeed, you should cloze Back before Front since you opened it after Front. If you create a note with some value in Back and no value in Front, you'll see the message "{unknown field /Back}" (which is a really badly written error message). However, anki will still generate some content when you use this model. It is possible that the content generated with and without this add-on will differ.

Internal

This modify the following method, without calling the previous version.

  • anki.template.template.Template.render_sections
  • anki.template.template.Template.render_tags It also creates the methods:
  • anki.template.template.Template.sub_section
  • anki.template.template.Template.sub_tag

Anki > 2.1.20

Anki changed a lot in version 2.1.20. I am currently unable to understand those change, as they are in rust, and I don't know it. Furthermore, rules for card generation change, so it's possible that this add-on becomes useless. Anyway, until I know more about 2.1.20, this add-on won't be available with latest anki. As this add-on as only peen downloaded 63 times, I believe that's not a real trouble.

Links, licence and credits

Key Value
Copyright Arthur Milchior arthur@milchior.fr
Based on Anki code by Damien Elmes anki@ichi2.net
License GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
Source in https://github.com/Arthur-Milchior/anki-better-card-generation
Addon number 115825506