Initial commit

This commit is contained in:
Nate Bowman
2026-10-07 17:28:39 -04:00
commit 9d5cc75426
8 changed files with 248 additions and 0 deletions

25
website/config.py Normal file
View File

@@ -0,0 +1,25 @@
from pathlib import Path
from types import SimpleNamespace
import yaml
config_file = '/home/nate/projects/games-spreadsheet/config.yaml'
with open(config_file, 'r') as f:
c = yaml.safe_load(f)
root_path = Path(c['storage']['root'])
copied_keys = [
'users',
'key',
'share',
'user_games_refresh_delay_seconds',
'max_players_refresh_delay_seconds'
]
config = SimpleNamespace({k: c[k] for k in copied_keys})
config.max_player_spreadsheet_path = (root_path /
c['storage']['resources'] /
'max-players.ods')
config.resources = root_path / c['storage']['resources']