From f18617c30cc15aa71fb3a46deaf4ca7f6b3383e2 Mon Sep 17 00:00:00 2001 From: tim Date: Sun, 27 Aug 2023 10:00:39 +0930 Subject: [PATCH] basic example --- 2minNoods.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 2minNoods.sh 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