#!/usr/bin/env python3 """ build.py - regenerate index.html for the AI Cost Watch interactive tool. Reads costwatch.json (the frozen dataset) and writes a single self-contained, dependency-free index.html with the data embedded verbatim. Standard library only. Usage (run in your terminal): python3 build.py To add a new issue: append one object to "issues" in costwatch.json (and any new "readings" to the indicators), then re-run this script. Nothing else changes. """ import json, pathlib HERE = pathlib.Path(__file__).resolve().parent DATA = json.loads((HERE / "costwatch.json").read_text(encoding="utf-8")) TEMPLATE = r"""