#!/bin/bash # Retakes the screenshots of docs/schermate from a running demo (spec ยง10.7): # dotnet run --project src/Febe.Server -- --demo --porta 8490 (in another terminal) # bash tools/schermate/tutte.sh [porta] [cartella] # One screenshot at a time: Chromium and the demo share the computer. set -u here="$(cd "$(dirname "$0")" && pwd)" port="${1:-8480}" out="${2:-$here/../../docs/schermate}" b="http://127.0.0.1:$port" mkdir -p "$out" shot() { echo "== $2"; timeout 90 node "$here/schermata.mjs" "$1" "$out/$2" "${3:-1440}" "${4:-900}" "${5:-3000}" ${6:-}; } shot "$b/libreria?tema=chiaro" 01-libreria.png 1440 900 3000 "$here/passi/puntatore.js" shot "$b/libreria?tema=chiaro" 02-visualizzatore.png 1440 900 3000 "$here/passi/visualizzatore.js" shot "$b/account?tema=chiaro" 03-account.png shot "$b/account?tema=chiaro" 03-account-telefono.png 390 844 shot "$b/account?dialogo=aggiungi&tema=chiaro" 04-aggiungi-account.png 1440 900 3000 "$here/passi/aggiungi.js" shot "$b/account/3/impostazioni?tema=chiaro" 05-account-impostazioni.png shot "$b/libreria?scena=fermo&tema=scuro" 11-libreria-fermo-tema-scuro.png shot "$b/account/2?tema=scuro&tipo=storie" 12-account-storie-tema-scuro.png shot "$b/libreria?tema=chiaro" 14-finestra-stretta.png 860 900 shot "$b/libreria?tema=chiaro" 14-telefono.png 390 844 shot "$b/account/2/cronologia?tema=chiaro" account-cronologia.png