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

Preserves the current scheduler state stored on one card without running Anki's scheduler. More...

Public Member Functions

 AnkiScheduling ()
 Initializes safe unscheduled state for a newly generated card.

Properties

static AnkiScheduling New = new() [get]
 Gets a reusable safe state for a newly generated card.
AnkiCardType Type = AnkiCardType.New [get]
 Gets the underlying learning phase retained by the card.
AnkiCardQueue Queue = AnkiCardQueue.New [get]
 Gets the active, inactive, or preview scheduler queue.
long Due [get]
 Gets the queue-dependent due value.
int Interval [get]
 Gets the current interval encoding.
int EaseFactor [get]
 Gets the legacy ease factor in per-mille units.
int Repetitions [get]
 Gets how many answers have been recorded for the card.
int Lapses [get]
 Gets how many recorded answers caused the card to lapse.
int RemainingSteps [get]
 Gets Anki's packed remaining-learning-step value.
long OriginalDue [get]
 Gets the due value saved before a filtered-deck or rescheduling operation.
long OriginalDeckId [get]
 Gets the deck from which the card was moved into a filtered deck.
string CustomData = string.Empty [get]
 Gets opaque scheduler- or add-on-owned data.

Detailed Description

Preserves the current scheduler state stored on one card without running Anki's scheduler.

This immutable record is a storage model. Assign a new value (or a with copy) to AnkiCard.Scheduling when state changes, then validate the complete deck. Queue-dependent units are crucial: New due values are positions, intraday Learning due values are normally Unix seconds, and Review or DayLearning due values are collection-relative day numbers. Positive intervals represent days while negative learning intervals encode seconds.

Native AnkiIO JSON preserves every property. The supported legacy APKG adapter preserves these current card columns, but CrowdAnki-style JSON intentionally regenerates cards as new and reports CROWD001. Custom data is opaque; AnkiIO does not parse FSRS or add-on-owned payloads.

card.Scheduling = new AnkiScheduling
{
Type = AnkiCardType.Review,
Queue = AnkiCardQueue.Review,
Due = 250, // collection-relative day
Interval = 14, // days
EaseFactor = 2500, // 250%
};
long Due
Gets the queue-dependent due value.
int EaseFactor
Gets the legacy ease factor in per-mille units.
int Interval
Gets the current interval encoding.
AnkiScheduling()
Initializes safe unscheduled state for a newly generated card.
AnkiCardQueue Queue
Gets the active, inactive, or preview scheduler queue.
int Repetitions
Gets how many answers have been recorded for the card.
AnkiCardType Type
Gets the underlying learning phase retained by the card.
Captures the ordered diagnostics and write/no-write decision from one validation pass.
Checks a complete deck hierarchy before native JSON, CrowdAnki-style JSON, or APKG output.
static AnkiValidationResult Validate(AnkiDeck root)
Validates a root deck and every reachable descendant without modifying them.
AnkiCardType
Identifies the learning phase retained by an Anki card.
AnkiCardQueue
Identifies the active, inactive, or preview queue in which Anki stores a card.

Definition at line 30 of file AnkiScheduling.cs.

Constructor & Destructor Documentation

◆ AnkiScheduling()

AnkiIO.AnkiScheduling.AnkiScheduling ( )
inline

Initializes safe unscheduled state for a newly generated card.

Type and queue are New, all numeric values are zero, and custom data is empty.

Definition at line 34 of file AnkiScheduling.cs.

Property Documentation

◆ CustomData

string AnkiIO.AnkiScheduling.CustomData = string.Empty
get

Gets opaque scheduler- or add-on-owned data.

A verbatim string, commonly empty; AnkiIO does not parse or normalize it.

Definition at line 84 of file AnkiScheduling.cs.

◆ Due

long AnkiIO.AnkiScheduling.Due
get

Gets the queue-dependent due value.

A new-card position, Unix timestamp in seconds, collection-relative day, or preserved special-queue value.

Definition at line 52 of file AnkiScheduling.cs.

◆ EaseFactor

int AnkiIO.AnkiScheduling.EaseFactor
get

Gets the legacy ease factor in per-mille units.

For example, 2500 represents 250%; zero means no factor has been assigned.

Definition at line 60 of file AnkiScheduling.cs.

◆ Interval

int AnkiIO.AnkiScheduling.Interval
get

Gets the current interval encoding.

Days when positive, seconds encoded as a negative value for intraday learning, or zero when unassigned.

Definition at line 56 of file AnkiScheduling.cs.

◆ Lapses

int AnkiIO.AnkiScheduling.Lapses
get

Gets how many recorded answers caused the card to lapse.

A non-negative count; a New card must use zero.

Definition at line 68 of file AnkiScheduling.cs.

◆ New

AnkiScheduling AnkiIO.AnkiScheduling.New = new()
staticget

Gets a reusable safe state for a newly generated card.

An immutable New/New value with zero counters and no custom data.

Definition at line 40 of file AnkiScheduling.cs.

◆ OriginalDeckId

long AnkiIO.AnkiScheduling.OriginalDeckId
get

Gets the deck from which the card was moved into a filtered deck.

The original stable deck ID, or zero when the card was not moved.

Definition at line 80 of file AnkiScheduling.cs.

◆ OriginalDue

long AnkiIO.AnkiScheduling.OriginalDue
get

Gets the due value saved before a filtered-deck or rescheduling operation.

The original queue-dependent due value, or zero when no original value applies.

Definition at line 76 of file AnkiScheduling.cs.

◆ Queue

AnkiCardQueue AnkiIO.AnkiScheduling.Queue = AnkiCardQueue.New
get

Gets the active, inactive, or preview scheduler queue.

A queue compatible with Type; the default is New.

Definition at line 48 of file AnkiScheduling.cs.

◆ RemainingSteps

int AnkiIO.AnkiScheduling.RemainingSteps
get

Gets Anki's packed remaining-learning-step value.

An opaque scheduler-specific integer retained verbatim rather than interpreted by AnkiIO.

Definition at line 72 of file AnkiScheduling.cs.

◆ Repetitions

int AnkiIO.AnkiScheduling.Repetitions
get

Gets how many answers have been recorded for the card.

A non-negative count; a New card must use zero.

Definition at line 64 of file AnkiScheduling.cs.

◆ Type

AnkiCardType AnkiIO.AnkiScheduling.Type = AnkiCardType.New
get

Gets the underlying learning phase retained by the card.

One of the four defined AnkiCardType values; the default is New.

Definition at line 44 of file AnkiScheduling.cs.


The documentation for this class was generated from the following file: