#!/bin/bash mkdir -p siteroot # html and css stolen from https://perfectmotherfuckingwebsite.com/ cat < siteroot/index.html 2minNoods

2minNoods


EOF ls *.jpg | sort -r > photolist.txt while read i; do if [ -f "$i" ]; then if [ ! -f "siteroot/$i" ]; then echo "Resizing $i" convert "$i" -quality 80 -strip -auto-orient -resize "2160^>" "siteroot/$i" fi echo '

'"$(basename $i .jpg)"'

' >> siteroot/index.html echo '
' >> siteroot/index.html fi done < photolist.txt cat <> siteroot/index.html EOF rm photolist.txt