forge
Explore
Log in

Don't you dare go Hollow

yumush

Clone
★ 0

0 watching0 forksRustAGPL-3.06.8 MiB27ceb05Tahinli7 hours ago399 commits

compare.sh14 lines, 607 bytesHistoryRawDownload
1#!/usr/bin/env bash
2set -euo pipefail
3STATE="${HARNESS_STATE:-/tmp/claude-1000/yumush-harness}"
4page="$1"
5state="$2"
6artifact="$3"
7out="$STATE/shots/gallery"
8size=1120,720
9[ "$state" = narrow ] && size=800,600
10profile="$(mktemp -d -p "$STATE")"
11firefox --headless --profile "$profile" --window-size "$size" --screenshot "$out/$page-$state-artifact.png" "file://$artifact#$page:$state" >/dev/null 2>&1
12rm -rf "$profile"
13magick montage "$out/$page-$state-artifact.png" "$out/$page-$state.png" -tile 2x1 -geometry +8+8 -background '#808080' "$out/$page-$state-compare.png"
14echo "$out/$page-$state-compare.png"