This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
models_def.py
43 lines (41 loc) · 1.55 KB
/
models_def.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from anki.consts import MODEL_STD, MODEL_CLOZE
COMMON_FIELDS = ('Header', 'Intro', 'Cover', 'Instruction', 'Explanation', 'Reference')
STICKY_FIELDS = ('Header', 'Intro', 'Cover', 'Instruction', 'Reference')
MODELS = {
'InteractiveDebug': {
'type': MODEL_STD,
'fields': ('Front', 'Back') + COMMON_FIELDS,
'css': ("clean.css", "main.css", "theme.css"),
'html': ("debug-front.html", "debug-back.html")
},
'InteractiveBase': {
'type': MODEL_STD,
'fields': ('Question', 'Answer') + COMMON_FIELDS,
'css': ("clean.css", "main.css", "theme.css"),
'html': ("base-front.html", "base-back.html")
},
'InteractiveChoice': {
'type': MODEL_STD,
'fields': ('Question', 'Choices') + COMMON_FIELDS,
'css': ("clean.css", "main.css", "theme.css"),
'html': ("choice-front.html", "choice-back.html")
},
'InteractiveCloze': {
'type': MODEL_CLOZE,
'fields': ('Text', 'Words') + COMMON_FIELDS,
'css': ("clean.css", "main.css", "theme.css"),
'html': ("cloze-front.html", "cloze-back.html")
},
'InteractiveComplete': {
'type': MODEL_CLOZE,
'fields': ('Text', 'Choices') + COMMON_FIELDS,
'css': ("clean.css", "main.css", "theme.css"),
'html': ("complete-front.html", "cloze-back.html")
},
'InteractiveOrder': {
'type': MODEL_CLOZE,
'fields': ('Text', 'Words') + COMMON_FIELDS,
'css': ("clean.css", "main.css", "theme.css"),
'html': ("order-front.html", "cloze-back.html")
},
}