aqt.reviewer#
Attributes#
Classes#
Create a collection of name/value pairs. |
|
Stores the top of the card queue for the v3 scheduler. |
|
Create a collection of name/value pairs. |
|
Create a collection of name/value pairs. |
|
Functions#
|
Module Contents#
- class aqt.reviewer.RefreshNeeded(*args, **kwds)#
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- NOTE_TEXT#
- QUEUES#
- FLAG#
- aqt.reviewer.replay_audio(card: anki.cards.Card, question_side: bool) None#
- class aqt.reviewer.V3CardInfo#
Stores the top of the card queue for the v3 scheduler.
This includes current and potential next states of the displayed card, which may be mutated by a user’s custom scheduling.
- queued_cards: anki.scheduler.v3.QueuedCards#
- states: anki.scheduler.v3.SchedulingStates#
- context: anki.scheduler.v3.SchedulingContext#
- static from_queue(queued_cards: anki.scheduler.v3.QueuedCards) V3CardInfo#
- top_card() anki.scheduler.v3.QueuedCards.QueuedCard#
- counts() tuple[int, list[int]]#
Returns (idx, counts).
- static rating_from_ease(ease: int) anki.scheduler.v3.CardAnswer.Rating.V#
- class aqt.reviewer.AnswerAction(*args, **kwds)#
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- BURY_CARD = 0#
- ANSWER_AGAIN = 1#
- ANSWER_GOOD = 2#
- ANSWER_HARD = 3#
- SHOW_REMINDER = 4#
- class aqt.reviewer.QuestionAction(*args, **kwds)#
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- SHOW_ANSWER = 0#
- SHOW_REMINDER = 1#
- class aqt.reviewer.Reviewer(mw: aqt.AnkiQt)#
- mw#
- web#
- card: anki.cards.Card | None = None#
- previous_card: anki.cards.Card | None = None#
- typeCorrect: str | None = None#
- state: Literal['question', 'answer', 'transition'] | None = None#
- bottom#
- auto_advance_enabled = False#
- show() None#
- lastCard() anki.cards.Card | None#
- cleanup() None#
- refresh_if_needed() None#
- op_executed(changes: anki.collection.OpChanges, handler: object | None, focused: bool) bool#
- nextCard() None#
- get_scheduling_states() anki.scheduler.v3.SchedulingStates#
- get_scheduling_context() anki.scheduler.v3.SchedulingContext#
- set_scheduling_states(request: anki.scheduler.v3.SetSchedulingStatesRequest) None#
- replayAudio() None#
- revHtml() str#
- autoplay(card: anki.cards.Card) bool#
- korean_shortcuts() collections.abc.Sequence[tuple[str, collections.abc.Callable] | tuple[Qt.Key, collections.abc.Callable]]#
- on_pause_audio() None#
- seek_secs = 5#
- on_seek_backward() None#
- on_seek_forward() None#
- onEnterKey() None#
- typeAnsPat = '\\[\\[type:(.+?)\\]\\]'#
- typeAnsFilter(buf: str) str#
- typeAnsQuestionFilter(buf: str) str#
- typeAnsAnswerFilter(buf: str) str#
- onLeech(suspended: bool = False) None#
- check_timebox() bool#
True if answering should be aborted.
- showContextMenu() None#
- onOptions() None#
- on_previous_card_info() None#
- on_card_info() None#
- set_flag_on_current_card(desired_flag: int) None#
- set_flag_func(desired_flag: int) collections.abc.Callable#
- toggle_mark_on_current_note() None#
- on_set_due() None#
- suspend_current_note() None#
- suspend_current_card() None#
- bury_current_note() None#
- bury_current_card() None#
- forget_current_card() None#
- on_create_copy() None#
- delete_current_note() None#
- onRecordVoice() None#
- onReplayRecorded() None#
- toggle_auto_advance() None#
- auto_advance_if_enabled() None#
- onBuryCard#
- onBuryNote#
- onSuspend#
- onSuspendCard#
- onDelete#
- onMark#
- setFlag#
- aqt.reviewer.RUN_STATE_MUTATION = Multiline-String#
Show Value
""" anki.mutateNextCardStates('{key}', async (states, customData, ctx) => {{ {js} }}).finally(() => bridgeCommand('statesMutated')); """