Video-Gen / app /core /templates.py
jacky3102's picture
Upload 33 files
9459cd0 verified
Raw
History Blame Contribute Delete
470 Bytes
"""
Template System — style/branding config lives entirely in templates/*.json.
Adding a new channel means adding a new JSON file, never touching code.
"""
import json
import os
TEMPLATE_DIR = "templates"
def load_template(name: str) -> dict:
path = os.path.join(TEMPLATE_DIR, f"{name}.json")
if not os.path.exists(path):
path = os.path.join(TEMPLATE_DIR, "default.json")
with open(path, "r", encoding="utf-8") as f:
return json.load(f)