AnkiIO 1.0.2
Build, validate, import, and export Anki-compatible decks from .NET
Loading...
Searching...
No Matches
Anki concepts

Anki separates stored information from study prompts:

  • An AnkiDeck owns notes, nested decks, and registered media.
  • An AnkiNote stores ordered field values, tags, a stable import GUID, and generated cards.
  • An AnkiNoteType defines fields, CSS, and one or more AnkiCardTemplate objects.
  • An AnkiCard is one study direction generated from a template. Scheduling and review history belong to the card, not to the note.

A Basic note type normally has Front and Back fields and one template, so one note creates one card. A Basic-and-reversed type has two templates and creates two cards. A Cloze type creates one card for each distinct positive cN marker found in its text.

Hierarchies and identity

Create child decks with AnkiDeck.AddSubdeck(). Anki's displayed hierarchy uses Parent::Child names, while AnkiIO stores each local segment separately and traverses the hierarchy in stable insertion order. Deck, note, card, and note type identifiers are 64-bit values. Let AnkiIO generate them unless importing known identities.

Scheduling

AnkiScheduling.New is the safest state for generated cards. Advanced scheduling values are preserved by native JSON and legacy APKG I/O, but queue and card-type combinations must be consistent. Suspended and buried queues retain the underlying card type; the meaning of Due depends on the active queue. Never synthesize review history merely to make a card appear mature.

The mutable object graph is designed for single-operation construction and editing. It is not safe for concurrent mutation unless a member explicitly documents otherwise.