20 lines
658 B
Python
20 lines
658 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)
|
|
|
|
root_path = Path(c['storage']['root'])
|
|
|
|
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']
|