diff --git a/2minNoods.sh b/2minNoods.sh new file mode 100755 index 0000000..4aa0b3a --- /dev/null +++ b/2minNoods.sh @@ -0,0 +1,64 @@ +#!/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