anki.scheduler.base
===================

.. py:module:: anki.scheduler.base


Attributes
----------

.. autoapisummary::

   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


Classes
-------

.. autoapisummary::

   anki.scheduler.base.SchedulerBase


Module Contents
---------------

.. py:data:: SchedTimingToday

.. py:data:: CongratsInfo

.. py:data:: UnburyDeck

.. py:data:: BuryOrSuspend

.. py:data:: CustomStudyRequest

.. py:data:: CustomStudyDefaults

.. py:data:: ScheduleCardsAsNew

.. py:data:: ScheduleCardsAsNewDefaults

.. py:data:: FilteredDeckForUpdate

.. py:data:: RepositionDefaults

.. py:class:: SchedulerBase(col: anki.collection.Collection)

   Bases: :py:obj:`anki._legacy.DeprecatedNamesMixin`


   Actions shared between schedulers.


   .. py:attribute:: version
      :value: 0



   .. py:attribute:: col


   .. py:property:: today
      :type: int



   .. py:property:: day_cutoff
      :type: int



   .. py:method:: countIdx(card: anki.cards.Card) -> int


   .. py:method:: 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.



   .. py:method:: congratulations_info() -> CongratsInfo


   .. py:method:: have_buried_siblings() -> bool


   .. py:method:: have_manually_buried() -> bool


   .. py:method:: have_buried() -> bool


   .. py:method:: custom_study(request: CustomStudyRequest) -> anki.collection.OpChanges


   .. py:method:: custom_study_defaults(deck_id: anki.decks.DeckId) -> CustomStudyDefaults


   .. py:method:: extend_limits(new: int, rev: int) -> None


   .. py:method:: rebuild_filtered_deck(deck_id: anki.decks.DeckId) -> anki.collection.OpChangesWithCount


   .. py:method:: empty_filtered_deck(deck_id: anki.decks.DeckId) -> anki.collection.OpChanges


   .. py:method:: get_or_create_filtered_deck(deck_id: anki.decks.DeckId) -> FilteredDeckForUpdate


   .. py:method:: add_or_update_filtered_deck(deck: FilteredDeckForUpdate) -> anki.collection.OpChangesWithId


   .. py:method:: filtered_deck_order_labels() -> collections.abc.Sequence[str]


   .. py:method:: unsuspend_cards(ids: collections.abc.Sequence[anki.cards.CardId]) -> anki.collection.OpChanges


   .. py:method:: unbury_cards(ids: collections.abc.Sequence[anki.cards.CardId]) -> anki.collection.OpChanges


   .. py:method:: unbury_deck(deck_id: anki.decks.DeckId, mode: UnburyDeck = UnburyDeck.ALL) -> anki.collection.OpChanges


   .. py:method:: suspend_cards(ids: collections.abc.Sequence[anki.cards.CardId]) -> anki.collection.OpChangesWithCount


   .. py:method:: suspend_notes(ids: collections.abc.Sequence[anki.notes.NoteId]) -> anki.collection.OpChangesWithCount


   .. py:method:: bury_cards(ids: collections.abc.Sequence[anki.cards.CardId], manual: bool = True) -> anki.collection.OpChangesWithCount


   .. py:method:: bury_notes(note_ids: collections.abc.Sequence[anki.notes.NoteId]) -> anki.collection.OpChangesWithCount


   .. py:method:: 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.



   .. py:method:: schedule_cards_as_new_defaults(context: ScheduleCardsAsNew) -> ScheduleCardsAsNewDefaults


   .. py:method:: 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.



   .. py:method:: reset_cards(ids: list[anki.cards.CardId]) -> None

      Completely reset cards for export.



   .. py:method:: 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


   .. py:method:: reposition_defaults() -> RepositionDefaults


   .. py:method:: randomize_cards(did: anki.decks.DeckId) -> None


   .. py:method:: order_cards(did: anki.decks.DeckId) -> None


   .. py:method:: resort_conf(conf: anki.decks.DeckConfigDict) -> None


   .. py:method:: maybe_randomize_deck(did: anki.decks.DeckId | None = None) -> None


