Bootstrap project and safe work-item workflow
This commit is contained in:
12
webapp/page.py
Normal file
12
webapp/page.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""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))
|
||||
Reference in New Issue
Block a user