Files
aoe2-flashcard-creator/flashcards/config.py
Nate Bowman 80bb9790bf Remove fighting files from module
Moved them to their own module. Must now import that module to use any
of the fighting functions.
2026-10-27 19:51:53 -04:00

20 lines
521 B
Python

from pathlib import Path
from types import SimpleNamespace
import yaml
config_file = '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_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'