Add helper function

This commit is contained in:
Nate Bowman
2026-11-20 19:59:59 -05:00
parent 9c4b9bd020
commit 9132636d40
2 changed files with 24 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import yaml
config_file = 'settings.yaml'
config_file = '/home/nate/projects/aoe/flashcards/settings.yaml'
with open(config_file, 'r') as f:
c = yaml.safe_load(f)
@@ -12,6 +12,7 @@ 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'