buckrogers/scripts/generate-thumbs.sh

20 lines
463 B
Bash
Raw Permalink Normal View History

2021-12-29 22:35:55 +00:00
#!/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"