Improve speed of change of note type

AnkiWeb addon 115825506

Speeds up note-type changes by optimizing template rendering in a single pass and removes the hundred-field-per-card limit, with minor edge-case rendering differences.
AI-generated summary; may contain mistakes.

note-managementcard-templatesobsolete

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
3 (πŸ‘ 3 Β· πŸ‘Ž 0)
Updated
2019-03-05
Anki versions
<=2.1.19
License
GPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, Batchfile
Description language
en

Maintenance

abandoned

  • Last update or commit: 2020-08-02 (2282 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 0 open, 1 closed.
  • Pull requests: 0 open, 0 merged.
  • Median first response: 1 hour (1 answered issues and pull requests).

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

Better Markdown Anki

Renders Anki flashcards with enhanced markdown, LaTeX math, syntax highlighting, theme-aware styling, and interactive cloze toggles via React-based note types.

formattingappearancecard-templatescloze

25 votes 65% approval πŸ‘ 21 Β· πŸ‘Ž 4 ⭐ 31 Anki 2.1.66~ Updated 2026-10-15
PDF/HTML Exporter

Exports the back sides of selected cards to a standalone HTML file, preserving styling and images, ready for printing, sharing, archiving, or saving as PDF.

export

3 votes 21% approval πŸ‘ 2 Β· πŸ‘Ž 1 ⭐ 0 Anki 25.09.2~ Updated 2025-12-16

Description

Changing a model may be a really long process when you have plenty of field or of card type. This add-on improve considerably this time. For example, a note type I used in my collection took 7 minutes and a half to edit before. With this add-on, it only took 3 minutes.

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