Add helper function
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user