anki.scheduler.v3#
The V3/2021 scheduler.
https://faqs.ankiweb.net/the-2021-scheduler.html
It uses the same DB schema as the V2 scheduler, and ‘schedVer’ remains as ‘2’ internally.
Attributes#
Classes#
Legacy aliases and helpers. These will go away in the future. |
Module Contents#
- anki.scheduler.v3.QueuedCards#
- anki.scheduler.v3.SchedulingState#
- anki.scheduler.v3.SchedulingStates#
- anki.scheduler.v3.SchedulingContext#
- anki.scheduler.v3.SchedulingStatesWithContext#
- anki.scheduler.v3.SetSchedulingStatesRequest#
- anki.scheduler.v3.CardAnswer#
- class anki.scheduler.v3.Scheduler(col: anki.collection.Collection)#
Bases:
anki.scheduler.legacy.SchedulerBaseWithLegacyLegacy aliases and helpers. These will go away in the future.
- version = 3#
- reps = 0#
- get_queued_cards(*, fetch_limit: int = 1, intraday_learning_only: bool = False) QueuedCards#
Returns zero or more pending cards, and the remaining counts. Idempotent.
- describe_next_states(next_states: SchedulingStates) collections.abc.Sequence[str]#
Labels for each of the answer buttons.
- build_answer(*, card: anki.cards.Card, states: SchedulingStates, rating: CardAnswer) CardAnswer#
Build input for answer_card().
- answer_card(input: CardAnswer) anki.collection.OpChanges#
Update card to provided state, and remove it from queue.
- state_is_leech(new_state: SchedulingState) bool#
True if new state marks the card as a leech.
- reset() None#
- getCard() anki.cards.Card | None#
Fetch the next card from the queue. None if finished.
- counts(card: anki.cards.Card | None = None) tuple[int, int, int]#
- property newCount: int#
- property lrnCount: int#
- property reviewCount: int#
- nextIvlStr(card: anki.cards.Card, ease: int, short: bool = False) str#
Return the next interval for CARD as a string.
- answerCard(card: anki.cards.Card, ease: Literal[1, 2, 3, 4]) anki.collection.OpChanges#
- nextIvl(card: anki.cards.Card, ease: int) anki.consts.Any#
Don’t use this - it is only required by tests, and will be moved in the future.
- property active_decks: list[anki.decks.DeckId]#