#!/usr/bin/env python3 """Print captured body templates (structure only) for chosen actions.""" from __future__ import annotations import json import pathlib import sys sys.path.insert(0, "src") from wodify import actions, config # noqa: E402 wanted = sys.argv[1:] or ["attendees", "classdetail", "coach"] cache = json.loads(pathlib.Path(config.cache_path()).read_text(encoding="utf-8")) for key in wanted: action = actions.ACTIONS[key] entry = (cache.get("actions") or {}).get(action.path) or {} print("=" * 70) print(f"{key} view={entry.get('view_name')}") print(json.dumps(entry.get("body_template"), indent=1)[:1400])