From 736b03825e2147e32166a84606ce6e77776979cb Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 31 Jul 2024 11:58:39 +0930 Subject: [PATCH] Improved comments --- 2minNoods.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/2minNoods.sh b/2minNoods.sh index e666dc9..5e83bc3 100755 --- a/2minNoods.sh +++ b/2minNoods.sh @@ -1,15 +1,19 @@ #!/bin/bash +# Dependencies: mktemp, sed, imagemagick, basename, grep, sort + +# Config variables siteroot="../2minNoods_siteroot" noodspp=40 - -mkdir -p "$siteroot/img/thumbs" +# Don't touch these pageno=1 noodcount=1 photolist="$(mktemp --suffix='.txt')" +mkdir -p "$siteroot/img/thumbs" -# html and css stolen from https://perfectmotherfuckingwebsite.com/ +# html and css stolen from: https://perfectmotherfuckingwebsite.com/ +# a.button stolen from: https://stackoverflow.com/a/2906586 pageheader=''' @@ -87,15 +91,16 @@ done < "$photolist" for ((page=1;page<=pageno;page++)); do htmlpagenumbers=$( - echo -n '
') + echo -n '
' + ) echo "$htmlpagenumbers" >> "$siteroot/index.$page.html" sed -i "s%%$htmlpagenumbers%" "$siteroot/index.$page.html" echo '' >> "$siteroot/index.$page.html"