buckrogers/scripts/generate-thumbs.sh
2021-12-29 14:35:55 -08:00

20 lines
463 B
Bash
Executable File

#!/bin/bash
count=0
LC_ALL=C
rm -rf public
mkdir -p public
SECONDS=0
for file in screenshots/buck-rogers-ctd-*.png; do
newName="buck-rogers-ctd-$(printf '%03d' "${count}").png"
thumbName="${newName%.*}-thumb.jpeg"
echo -n "${count}: ${file}... ";
cp "${file}" "public/images/${newName}"
magick "${file}" -resize x108 -quality 50 -strip "public/images/${thumbName}";
echo "done";
count=$((count + 1))
done
echo "done in ${SECONDS}s"