Pre-2.0 ledger ids pointed at 2.0 entries or dropped (M32 to D3, E19 to A7, M4 to C1, P1/P3 to D5; E20, F7, M12 dropped); the dataset row and sentences read the served dataset policy; engineering-log citations name docs/bench-log.md; the node1-dn3 source notes gone; the earlier devnet named in governance; the four words on /address, /proving and /scenes; the tx fee sentence matches economics; provenance's SP1 sentence reads the current fact; receipt capitals and the unlabelled timing dropped; the lock tile reads active and total weight; TEAM-REPORTED labels on app, income, compatibility, build, light and the dev fee row. New /docs page listing the 2.0 documents by their master paths, wired into the build, nav, nav check, sitemap, capture and og. docs/site/audit-2.0.md moves each fixed item into "What was rewritten". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
36 lines
2.8 KiB
Bash
Executable file
36 lines
2.8 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Captures of every served route at 390 and 1440, dark and light (site-ui-5, 7 October 2026). Runs on igneum-build-2 (the
|
|
# Mac captures nothing: CLAUDE.md "Nothing heavy on the Mac"), one headless chromium at a time, against tools/site/serve.mjs
|
|
# on a port of its own with /api passed through to the live observer, so the chain scene paints from the real feed.
|
|
#
|
|
# tools/site/capture.sh <out dir> [<site dir>] [<chromium binary>]
|
|
# ROUTES="/ /live" tools/site/capture.sh <out dir> a subset
|
|
# WIDTHS="390 1440" THEMES="dark light" the defaults
|
|
#
|
|
# The binary defaults to Playwright's headless shell in ~/.cache/ms-playwright (the box has it); no npm package is needed.
|
|
# One PNG per route, width and theme: <route>__<width>-<theme>.png (the home is "home").
|
|
set -euo pipefail
|
|
OUT="${1:?out dir}"; HERE="$(cd "$(dirname "$0")" && pwd)"; SITE="${2:-$HERE/../../site}"; CHROME="${3:-}"
|
|
if [ -z "$CHROME" ]; then CHROME="$(ls -d "$HOME"/.cache/ms-playwright/chromium_headless_shell-*/chrome-linux/headless_shell 2>/dev/null | sort | tail -1 || true)"; fi
|
|
[ -x "$CHROME" ] || { echo "no chromium headless shell (pass its path as the third argument)" >&2; exit 2; }
|
|
PORT="${IGNEUM_SITE_PORT:-$((4500 + RANDOM % 400))}"
|
|
mkdir -p "$OUT"
|
|
node "$HERE/serve.mjs" "$PORT" "$SITE" > "$OUT/serve.log" 2>&1 &
|
|
SRV=$!
|
|
trap 'kill "$SRV" 2>/dev/null || true' EXIT
|
|
for i in $(seq 1 40); do curl -fsS "http://127.0.0.1:$PORT/" > /dev/null 2>&1 && break; sleep 0.25; done
|
|
curl -fsS "http://127.0.0.1:$PORT/" > /dev/null || { echo "the site did not answer on $PORT" >&2; cat "$OUT/serve.log" >&2; exit 3; }
|
|
ROUTES="${ROUTES:-/ /download /miner /app /wallet /live /explorer /evidence /litepaper /income /economics /scorecard /audit /docs /tuning /ledger /claims /randomx /provenance /miners /dev-fee /faucet /metamask /404 /acceptance}"
|
|
WIDTHS="${WIDTHS:-390 1440}"; THEMES="${THEMES:-dark light}"
|
|
shot() { # <route> <width> <theme>
|
|
local route="$1" width="$2" theme="$3" name height
|
|
name="${route#/}"; name="${name:-home}"; name="${name//\//-}"
|
|
if [ "$width" -le 480 ]; then height="${IGNEUM_SHOT_H_PHONE:-2400}"; else height="${IGNEUM_SHOT_H_DESKTOP:-1600}"; fi
|
|
local file="${name}__${width}-${theme}.png"
|
|
"$CHROME" --headless --no-sandbox --disable-gpu --hide-scrollbars --force-device-scale-factor=2 \
|
|
--window-size="$width,$height" --virtual-time-budget=12000 --run-all-compositor-stages-before-draw \
|
|
--screenshot="$OUT/$file" "http://127.0.0.1:$PORT$route?theme=$theme&motion=off" > "$OUT/$file.log" 2>&1 || { echo "FAILED $file"; cat "$OUT/$file.log"; return 1; }
|
|
echo "$file $(stat -c %s "$OUT/$file" 2>/dev/null || stat -f %z "$OUT/$file") B"
|
|
}
|
|
for r in $ROUTES; do for w in $WIDTHS; do for t in $THEMES; do shot "$r" "$w" "$t"; done; done; done
|
|
echo "done: $OUT"
|