21 lines
584 B
Python
21 lines
584 B
Python
from pathlib import Path
|
|
from types import SimpleNamespace
|
|
import yaml
|
|
|
|
|
|
|
|
config_file = '/home/nate/projects/aoe/flashcards/settings.yaml'
|
|
with open(config_file, 'r') as f:
|
|
c = yaml.safe_load(f)
|
|
|
|
data_path = Path(c['storage']['data'])
|
|
output_path = Path(c['storage']['output'])
|
|
|
|
config = SimpleNamespace()
|
|
config.data_dir = data_path
|
|
config.data_file = data_path / 'data.json'
|
|
config.name_data_file = data_path / 'name_data.json'
|
|
config.string_data_file = data_path / 'strings.json'
|
|
config.namelists_dir = output_path / 'namelists'
|
|
config.decks_dir = output_path / 'decks-output'
|