"""Produce the offline, self-contained home-server architecture explainer."""
from pathlib import Path
root=Path(__file__).resolve().parent
template=(root/'homeserver.template.html').read_text(encoding='utf-8')
assert template.count('__HOME_MODEL__')==1
html=template.replace('__HOME_MODEL__',(root/'homeserver-model.js').read_text(encoding='utf-8'))
(root/'homeserver-architecture.html').write_text(html,encoding='utf-8')
print('Built homeserver-architecture.html')
생성 코드·템플릿
build_homeserver.py
design/build_homeserver.py