If a note has no more card, warns instead of deleting it

AnkiWeb addon 2018640062

Prevents deleting notes that would be left with no cards during "Empty cards," instead tagging them NoteWithNoCard and opening the browser to show them.
AI-generated summary; may contain mistakes.

note-managementtaggingfork-or-reupload

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
5 (👍 5 · 👎 0)
Updated
2019-04-27
Anki versions
unknown
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, 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: 1 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.0–2019-04-27
History across monthly snapshots

Loading…

Similar addons

Bulk card creator with JSON

Creates many Anki notes at once from flat JSON arrays or mapped CSV/TSV data, supporting decks, tags, validation, warnings, and editable cards before bulk creation.

card-creationimport

10 votes 60% approval 👍 9 · 👎 1 ⭐ 1 Anki 2.1.1~ Updated 2026-04-25
Quick tagging 2.1

Lets you quickly add or edit tags while reviewing, with configurable shortcuts for specific tags and optional burying or suspending of cards or notes.

review-flowtaggingshortcuts

35 votes 85% approval 👍 34 · 👎 1 ⭐ 9 Anki 2.1.20~ Updated 2020-02-11

Description

Sometime, you press «Empty cards...», and anki also delete note. Because when a note has no more card, anki deletes it. However, maybe you didn't actually want to delete the whole note and lose its entire content. May be you thought anki were going to delete a few card which became empty, not realizing it will in fact delete EVERY cards, and thus delete the note, and its fields, and its tag... With this add-on, when you press «Empty cards», cards are deleted as usual, with one exception. If deleting the cards leave the note empty, then the cards are not deleted. Instead, the tag NoteWithNoCard is added to those notes, and the browser is opened to show those notes.

README

Tag notes with no card

Rationale

Sometime, you press «Empty cards...», and anki also delete note. Because when a note has no more card, anki deletes it. (see [https://github.com/Arthur-Milchior/anki/blob/master/documentation/deletion.md] for more information about deletion)

However, maybe you didn't actually want to delete the whole note and lose its entire content. May be you thought anki were going to delete a few card which became empty, not realizing it will in fact delete EVERY cards, and thus delete the note, and its fields, and its tag...

With this add-on, when you press «Empty cards», cards are deleted as usual, with one exception. If deleting the cards leave the note empty, then the cards are not deleted. Instead, the tag NoteWithNoCard is added to those notes, and the browser is opened to show those notes.

You can still delete those notes if that's what you want, but you have either to disable this add-on and restart anki, or to delete them manually from the browser.

Warning

The tag NoteWithNoCard is automatically removed from notes which now have a card, when you use «empty cards». This is probably what you want, so that the tag states the truth.

Note that a note with no cards can also occurs because of the synchronization process. In which card, this add-on won't save the note. Instead, you can save it using add-on 1135180054.

Version 2.0

Port by lovac42

Internal

This add-on modifies the method aqt.main.AnkiQt.onEmptyCards.

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-keep-empty-note
Addon number 2018640062