summaryrefslogtreecommitdiff
path: root/.local/share/Anki2/addons21/advanced_review/Skip.py
diff options
context:
space:
mode:
authorThanosApollo <[email protected]>2022-09-01 07:41:39 +0300
committerThanosApollo <[email protected]>2022-09-01 07:41:39 +0300
commit0c89df9be987008e55c1b336489c41290653434b (patch)
tree73425d852d363acdd6c9297a97616b23f9311bd4 /.local/share/Anki2/addons21/advanced_review/Skip.py
parenta6d1ec012952c5e955676af22732cd177d1f3abf (diff)
Remove anki addons
Diffstat (limited to '.local/share/Anki2/addons21/advanced_review/Skip.py')
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Skip.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/.local/share/Anki2/addons21/advanced_review/Skip.py b/.local/share/Anki2/addons21/advanced_review/Skip.py
deleted file mode 100644
index 47d5d11..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Skip.py
+++ /dev/null
@@ -1,39 +0,0 @@
-
-from aqt import mw
-from aqt import gui_hooks
-from aqt.utils import showInfo
-from aqt.reviewer import Reviewer
-
-#// Bury and mark for unburying
-def burySkipped():
- if hasattr(mw.reviewer, "skipped_cards"):
- mw.reviewer.skipped_cards.append(mw.reviewer.card.id)
- else:
- mw.reviewer.skipped_cards = [mw.reviewer.card.id,]
- mw.checkpoint(_("Bury"))
- mw.col.sched.buryCards([mw.reviewer.card.id])
- mw.reset()
-
-#// Unbury skipped cards
-def unburySkipped():
- allburied = [int(x) for x in mw.col.findCards("is:buried")]
- to_rebury = []
- if allburied:
- for card in allburied:
- if not card in mw.reviewer.skipped_cards:
- to_rebury.append(card)
- del mw.reviewer.skipped_cards
- mw.col.sched.unburyCards()
- if to_rebury:
- mw.col.sched.buryCards(to_rebury)
- mw.reset()
-
-def try_unburySkipped():
- if hasattr(mw.reviewer, "skipped_cards"):
- unburySkipped()
-
-#// Unbury skipped cards upon exiting review screeen
-gui_hooks.reviewer_will_end.append(try_unburySkipped)
-
-def test():
- showInfo("{}".format(mw.col.sched.version))