Moved them to their own module. Must now import that module to use any of the fighting functions.
20 lines
521 B
Python
20 lines
521 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)
|
|
|
|
data_path = Path(c['storage']['data'])
|
|
output_path = Path(c['storage']['output'])
|
|
|
|
config = SimpleNamespace()
|
|
config.data_file = data_path / 'data.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'
|