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