#!/usr/bin/env bash # Build a printable QR sticker sheet from gen-kit-codes.sh output. Each sticker # shows the kit id, a QR of the claim URL, and the 6-digit code — scanning it # opens /workshop?kit=..&code=.. with both pre-filled. QRs are baked in as inline # SVG, so the output HTML is fully self-contained (no fonts/scripts/network). # # ./gen-qr-sheet.sh [kit-codes.csv] [out.html] # # Requires qrencode at build time (brew install qrencode). Open the HTML and # print it (A4, ~9 stickers/page); the dashed borders are cut lines. set -euo pipefail CSV="${1:-kit-codes/kit-codes.csv}" OUT="${2:-kit-codes/qr-sheet.html}" command -v qrencode >/dev/null || { echo "need qrencode — brew install qrencode" >&2; exit 1; } [ -r "$CSV" ] || { echo "no CSV at $CSV (run gen-kit-codes.sh first)" >&2; exit 1; } esc() { sed -e 's/&/\&/g; s/\</g; s/>/\>/g'; } { cat <<'HEAD'
One sticker per kit. Scan the QR (or open the code manually) to claim your board to your team.