-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathankihorse_.py
48 lines (41 loc) · 1.26 KB
/
ankihorse_.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
44
45
46
47
48
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Ankihorse
=========
Adds pictures and vocalisation to japanese cards.
"""
from ankihorse import autopicture
from ankihorse import autovoice
from ankihorse import japanese_examples
autopicture.initialise\
( name='Japanese Autopicture'
, source_fields=['Expression', 'Kanji', 'Kana']
, target_field='Picture'
, locale='ja-JP'
, model_name_substring='japanese'
)
autovoice.initialise\
( name='Japanese Autovoice'
, language='japanese'
, source_fields=['Pronunciation', 'Expression', 'Kanji', 'Kana']
, target_field='Voice'
, model_name_substring='japanese'
, on_focus_lost=True
)
japanese_examples.initialise\
( name='Japanese Example Sentences'
, source_fields=['Expression']
, target_fields=['Sentence', 'Sentence-English', 'Sentence-Clozed']
, weighted=True
, model_name_substring='japanese'
, on_focus_lost=True
)
autovoice.initialise\
( name='Japanese Autovoice (Sentences)'
, language='japanese'
, source_fields=['Sentence']
, target_field='Sentence-Voice'
, model_name_substring='japanese'
, on_focus_lost=True
)