-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
55 lines (35 loc) · 1.24 KB
/
settings.py
File metadata and controls
55 lines (35 loc) · 1.24 KB
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
49
50
51
52
53
54
55
#
# Customizations and settings for this app
#
import os
# Path to your Anki Database
ANKI_PATH = '/Users/serghei/Documents/Saves/Anki/'
ANKI_USER = 'Saevon'
ANKI_DB = 'collection.anki2'
# Relative path for the output folder
OUTPUT = 'output'
# Relative path for the input data folder
DATA = 'data'
# Path for the complex readings file
COMPLEX_READINGS = 'complex.json'
# Path for the ignore unused readings file
UNUSED_READINGS = 'unused.json'
# Path for the jlpt kanji file
JLPT_PATH = 'jlpt_kanji.json'
# Path for Kanji dictionary
FULL_KANJI_DICT = os.path.join(DATA, 'kanjidic2.xml')
KANJI_DICT = os.path.join(DATA, 'kanjidic2_common.xml')
# KANJI_DICT = os.path.join(DATA, 'kanjidic2.xml')
# Html Output templates
DATA_HEADER = os.path.join(DATA, 'header.html')
DATA_CSS = os.path.join(DATA, 'main.css')
EXTRA_DICT_KANJI = os.path.join(DATA, 'extra_dict.json')
# Now we setup all the models
from models.anki import AnkiModel
from models.kanji_word import KanjiWord
from models.kanji import Kanji
AnkiModel.setup(path=os.path.join(ANKI_PATH, ANKI_USER, ANKI_DB))
KanjiWord.setup(path=os.path.join(DATA, COMPLEX_READINGS))
Kanji.setup(path=os.path.join(DATA, UNUSED_READINGS))
import jlpt
jlpt.setup_jlpt(path=os.path.join(DATA, JLPT_PATH))