#!/bin/bash
# Reruns every measurement and writes test-results.txt, then commands.log.
# Needs: node 20+ with playwright and sharp (set PW to the playwright path if it is not installed here), ffmpeg 6.x.
cd "$(dirname "$0")" && W=$(mktemp -d)
cp wright-mountain-cc0.jpg "$W/"
node tests.cjs "$W" 2>&1 | tee test-results.txt
node -e 'require("sharp")("wright-mountain-cc0.jpg").rotate().jpeg({quality:92}).toFile("photo.jpg")'
node -e 'require("sharp")("photo.jpg").resize(600,800,{fit:"cover"}).jpeg({quality:92}).toFile("small-3x4.jpg")'
bash commands.sh
