mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
remove init docstring; documented in addons.html now
This commit is contained in:
parent
245be4c166
commit
0317e63cfb
1 changed files with 0 additions and 35 deletions
|
@ -2,41 +2,6 @@
|
||||||
# Copyright: Damien Elmes <anki@ichi2.net>
|
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
"""\
|
|
||||||
Open a collection:
|
|
||||||
|
|
||||||
col = anki.Collection(path)
|
|
||||||
|
|
||||||
Prepare scheduler, or reset scheduler after changes:
|
|
||||||
|
|
||||||
col.reset()
|
|
||||||
|
|
||||||
Get a due card:
|
|
||||||
|
|
||||||
card = col.sched.getCard()
|
|
||||||
if not card:
|
|
||||||
# current deck is finished
|
|
||||||
|
|
||||||
Show the card:
|
|
||||||
|
|
||||||
print card.q(), card.a()
|
|
||||||
|
|
||||||
Answer the card:
|
|
||||||
|
|
||||||
col.sched.answerCard(card, ease)
|
|
||||||
|
|
||||||
Edit the card:
|
|
||||||
|
|
||||||
note = card.note()
|
|
||||||
for (name, value) in note.items():
|
|
||||||
note[name] = value + " new"
|
|
||||||
note.flush()
|
|
||||||
|
|
||||||
Save & close:
|
|
||||||
|
|
||||||
col.close()
|
|
||||||
"""
|
|
||||||
|
|
||||||
import sys, simplejson as _simplejson, httplib2 as _httplib2
|
import sys, simplejson as _simplejson, httplib2 as _httplib2
|
||||||
if sys.version_info[0] > 2:
|
if sys.version_info[0] > 2:
|
||||||
raise Exception("Anki should be run with Python 2")
|
raise Exception("Anki should be run with Python 2")
|
||||||
|
|
Loading…
Reference in a new issue