MedCaseAgent / scripts /export_static.py
MVChem
initial commit
01923e1
Raw History Blame Contribute Delete
541 Bytes
"""Export validated public content for the free static React deployment."""
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / 'backend'))
from app.content import EXAMPLE, PROJECT # noqa: E402
output = ROOT / 'frontend' / 'public' / 'api'
output.mkdir(parents=True, exist_ok=True)
for name, value in [('project', PROJECT), ('example', EXAMPLE)]:
(output / f'{name}.json').write_text(value.model_dump_json(indent=2) + '\n', encoding='utf-8')
print(f'Exported {name}.json')