api, talent list structures

This commit is contained in:
msk
2022-09-24 04:02:19 -07:00
parent 6a89ad4ec6
commit 5b458f2e1f
12 changed files with 248 additions and 36 deletions
+21
View File
@@ -0,0 +1,21 @@
import util
niji_en = dict()
holo_en = dict()
def __create_dict(file, _dict):
with open(file, 'r') as f:
for line in f:
words = line.split()
if len(words) == 2 and line[0] != '#':
name, id = line.split()
_dict[int(id)] = name
def init():
global niji_en
global holo_en
# holoEN
__create_dict(f'{util.get_project_dir()}/lists/holoen.txt', holo_en)
# nijiEN
__create_dict(f'{util.get_project_dir()}/lists/nijien.txt', niji_en)