# tools

- **`capture.mjs`** — deterministic frame capture: drives each animation's `__seek(n)` API in
  headless Chromium (Playwright), writes PNG frames, then assembles a palette-optimized GIF and an
  H.264 MP4 with ffmpeg. Hard-fails if the page makes any network request, and `--verify`
  re-seeks a fixed set of frames after a reload and sha256-compares them to prove the render is a
  pure function of the frame index.
- **`inline_data.mjs`** — injects `data/*.json` into each animation's embedded `<script id="DATA">`
  block so the pages stay fully self-contained. Idempotent; `data/` remains the canonical copy.
- **`extract_proj4.py`** — parses my simulator run logs (final stats blocks and per-kernel
  per-core counters) into `data/proj4_*.json`. It ships in this repo because it is pure regex over
  my own log text and contains no course logic. It refuses to read the course-supplied reference
  logs.

The equivalent extraction driver for the branch-divergence project is **deliberately absent**: it
embeds an instrumented copy of my graded analysis pass, so it stays in the private course
repository. Only its JSON output (`data/prj5_*.json`) appears here. See
[`../docs/HONOR_CODE.md`](../docs/HONOR_CODE.md).
