"""usage: contact_sheet.py SHOTS_DIR OUT_HTML — light and dark side by side, images inlined."""
import base64
import html
import sys
SHOTS, OUT = sys.argv[1], sys.argv[2]
PAGES = [
("overview", "Overview — 24 hours of a six-device household: total and blocked queries, and which device made them."),
("activity", "Activity — recent queries, each with its client, result and route."),
("query-detail", "Query detail — a blocked app-analytics lookup and the provenance that blocked it."),
("clients", "Clients — each device by name and group; the kids' phone runs with safe search and extra lists."),
("diagnostics", "Diagnostics — a resolved upstream episode: the primary DoH resolver was unreachable for about two minutes."),
]
def img(name, scheme):
with open(f"{SHOTS}/{name}-{scheme}.png", "rb") as f:
data = base64.b64encode(f.read()).decode()
return f'{html.escape(caption)}