Разделение на файлы, мелкие доработки.

This commit is contained in:
2026-06-11 13:18:22 +03:00
parent d2939754a6
commit 5ad2da7af8
7 changed files with 795 additions and 738 deletions
+19
View File
@@ -0,0 +1,19 @@
import os
import yaml
CONFIG = {}
STORAGE_ROOT = ""
def load_config():
global CONFIG, STORAGE_ROOT
with open("config.yaml", "r") as f:
CONFIG = yaml.safe_load(f)
STORAGE_ROOT = CONFIG["storage"]["root_dir"]
os.makedirs(STORAGE_ROOT, exist_ok=True)
return CONFIG
def get_storage_root():
return STORAGE_ROOT