diff --git a/flashcards/config.py b/flashcards/config.py index d63d03c..88b83af 100644 --- a/flashcards/config.py +++ b/flashcards/config.py @@ -8,12 +8,13 @@ config_file = 'settings.yaml' with open(config_file, 'r') as f: c = yaml.safe_load(f) -root_path = Path(c['storage']['root']) +data_path = Path(c['storage']['data']) +output_path = Path(c['storage']['output']) config = SimpleNamespace() -config.data_file = root_path / c['storage']['data'] / c['data_file'] -config.bonus_data_file = root_path / c['storage']['data'] / c['bonus_data_file'] -config.name_data_file = root_path / c['storage']['data'] / c['name_data_file'] -config.string_data_file = root_path / c['storage']['data'] / c['string_data_file'] -config.namelists_dir = root_path / c['storage']['namelists'] -config.decks_dir = root_path / c['storage']['decks'] +config.data_file = data_path / 'data.json' +config.bonus_data_file = data_path / 'bonuses.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' diff --git a/settings.yaml.example b/settings.yaml.example index 24347b1..196f8f0 100644 --- a/settings.yaml.example +++ b/settings.yaml.example @@ -1,10 +1,3 @@ storage: - root: '/home/nate/aoe/flashcards/' - data: 'data' - namelists: 'output/namelists' - maps: 'output/maps' - decks: 'output/decks-output' -data_file: 'data.json' -bonus_data_file: 'bonuses.json' -name_data_file: 'name_data.json' -string_data_file: 'strings.json' + data: '/home/nate/projects/aoe/flashcards/data' + output: '/home/nate/projects/aoe/flashcards/output'