More consistent cards generation

AnkiWeb addon 1713990897

Ensures cards are generated only when at least one non-empty field is displayed, correcting Anki's native behavior for non-cloze notes.
AI-generated summary; may contain mistakes.

card-templatesbugfix-workaroundobsolete

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
2 (👍 2 · 👎 0)
Updated
2019-08-12
Anki versions
<=2.1.19
License
GPL-3.0 (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python
Description language
en

Maintenance

abandoned

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

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.192019-08-12
History across monthly snapshots

Loading…

Similar addons

Leech Balancer has 1 fork →

Reduces a card's lapse count—or resets it to zero—after configurable consecutive correct answers, helping rehabilitate potential leech cards, with an optional notification.

schedulingleechfork-or-reupload

3 votes 44% approval 👍 3 · 👎 0 ⭐ 1 Anki 26.08.1~ Updated 2026-08-26
MCQ Generator

Creates and reviews single- and multiple-choice questions in Anki with an exam-style interface showing your selections, correct answers, color-coded feedback, and optional explanations.

card-creationreview-flowcard-templatesquiz

7 votes 25% approval 👍 4 · 👎 3 ⭐ 3 Anki 23.10~ Updated 2026-01-07
Export Anki cards as picture

Exports Anki cards as images using customizable Jinja2 HTML templates and CSS, with configurable resolution, auto-cropping, cloze replacement, excluded fields, and per-note/card-type templates.

exportcard-templates

1 votes 0% approval 👍 0 · 👎 1 ⭐ 0 Anki 24.06.2~ Updated 2024-06-18

Description

Ensure that cards are generated if and only if at least one non-empty field is shown.

README

More consistent cards generation

Rationale

If you are a power user, you may want to be able to use complex template. The rule «a card is generated if and only if the question side show the content of a field» is a really nice rule. But that's far from being what anki actually does. See generation ules for a real explanation

So, this add-on change anki, in order to ensure that cards are generated if only if they should be generated !

Warning

Computer only

It should sadly be noted that this add-on is kind of incompatible with any version of anki without this addon. It means that some cards may be generated here, and be seen as empty on ankidroid/ankiweb/ios.

Cloze deletion

This add-on only deals with non-cloze notes. In the case of cloze note, this add-on use the anki's standard algorithm to decide which cards remain. This may change in the future

Internal

It changes the following methods:

  • Template.render_unescaped, it now returns a pair, whose second element is True if and only if the field was found and showAField. (Currently, the field may be a special field. TODO: remove this)
  • Template.render_tags: similarly, it returns a pair, which is true if only if some field was found and showAField.
  • Template.render: same modification
  • _Collection._renderQA: The dictionnary returned contains an entry "showAField" which has the meaning of the previous change
  • Card.isEmpty: it now returns the correct answer !
  • ModelManager.availOrds: Same thing

Version 2.0

None

Anki > 2.1.19

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.

TODO

  • Do not consider cards with only special fields as successful cards.
  • Also correct cloze deletion generation

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-correct-card-generation
Addon number 1713990897