anki.scheduler.base#

Attributes#

Classes#

SchedulerBase

Actions shared between schedulers.

Module Contents#

anki.scheduler.base.SchedTimingToday#
anki.scheduler.base.CongratsInfo#
anki.scheduler.base.UnburyDeck#
anki.scheduler.base.BuryOrSuspend#
anki.scheduler.base.CustomStudyRequest#
anki.scheduler.base.CustomStudyDefaults#
anki.scheduler.base.ScheduleCardsAsNew#
anki.scheduler.base.ScheduleCardsAsNewDefaults#
anki.scheduler.base.FilteredDeckForUpdate#
anki.scheduler.base.RepositionDefaults#
class anki.scheduler.base.SchedulerBase(col: anki.collection.Collection)#

Bases: anki._legacy.DeprecatedNamesMixin

Actions shared between schedulers.

version = 0#
col#
property today: int#
property day_cutoff: int#
countIdx(card: anki.cards.Card) int#
deck_due_tree(top_deck_id: None = None) anki.decks.DeckTreeNode#
deck_due_tree(top_deck_id: anki.decks.DeckId) anki.decks.DeckTreeNode | None

Returns a tree of decks with counts. If top_deck_id provided, only the according subtree is returned.

congratulations_info() CongratsInfo#
have_buried_siblings() bool#
have_manually_buried() bool#
have_buried() bool#
custom_study(request: CustomStudyRequest) anki.collection.OpChanges#
custom_study_defaults(deck_id: anki.decks.DeckId) CustomStudyDefaults#
extend_limits(new: int, rev: int) None#
rebuild_filtered_deck(deck_id: anki.decks.DeckId) anki.collection.OpChangesWithCount#
empty_filtered_deck(deck_id: anki.decks.DeckId) anki.collection.OpChanges#
get_or_create_filtered_deck(deck_id: anki.decks.DeckId) FilteredDeckForUpdate#
add_or_update_filtered_deck(deck: FilteredDeckForUpdate) anki.collection.OpChangesWithId#
filtered_deck_order_labels() collections.abc.Sequence[str]#
unsuspend_cards(ids: collections.abc.Sequence[anki.cards.CardId]) anki.collection.OpChanges#
unbury_cards(ids: collections.abc.Sequence[anki.cards.CardId]) anki.collection.OpChanges#
unbury_deck(deck_id: anki.decks.DeckId, mode: UnburyDeck = UnburyDeck.ALL) anki.collection.OpChanges#
suspend_cards(ids: collections.abc.Sequence[anki.cards.CardId]) anki.collection.OpChangesWithCount#
suspend_notes(ids: collections.abc.Sequence[anki.notes.NoteId]) anki.collection.OpChangesWithCount#
bury_cards(ids: collections.abc.Sequence[anki.cards.CardId], manual: bool = True) anki.collection.OpChangesWithCount#
bury_notes(note_ids: collections.abc.Sequence[anki.notes.NoteId]) anki.collection.OpChangesWithCount#
schedule_cards_as_new(card_ids: collections.abc.Sequence[anki.cards.CardId], *, restore_position: bool = False, reset_counts: bool = False, context: ScheduleCardsAsNew | None = None) anki.collection.OpChanges#

Place cards back into the new queue.

schedule_cards_as_new_defaults(context: ScheduleCardsAsNew) ScheduleCardsAsNewDefaults#
set_due_date(card_ids: collections.abc.Sequence[anki.cards.CardId], days: str, config_key: anki.config.Config.String.V | None = None) anki.collection.OpChanges#

Set cards to be due in days, turning them into review cards if necessary. days can be of the form ‘5’ or ‘5-7’ If config_key is provided, provided days will be remembered in config.

reset_cards(ids: list[anki.cards.CardId]) None#

Completely reset cards for export.

reposition_new_cards(card_ids: collections.abc.Sequence[anki.cards.CardId], starting_from: int, step_size: int, randomize: bool, shift_existing: bool) anki.collection.OpChangesWithCount#
reposition_defaults() RepositionDefaults#
randomize_cards(did: anki.decks.DeckId) None#
order_cards(did: anki.decks.DeckId) None#
resort_conf(conf: anki.decks.DeckConfigDict) None#
maybe_randomize_deck(did: anki.decks.DeckId | None = None) None#