13 lines
475 B
Python
13 lines
475 B
Python
"""Render analyzer.html with %%TOKENS%% filled in. The page is otherwise static
|
|
and pulls its data from the JSON endpoints, so this only injects boot values."""
|
|
from pathlib import Path
|
|
|
|
_HTML = (Path(__file__).with_name("analyzer.html")).read_text(encoding="utf-8")
|
|
|
|
|
|
def render_page(total: int, library: str, db: str) -> str:
|
|
return (_HTML
|
|
.replace("%%TOTAL%%", f"{total:,}")
|
|
.replace("%%LIBRARY%%", library)
|
|
.replace("%%DB%%", db))
|