Improved comments

This commit is contained in:
tim 2024-07-31 11:58:39 +09:30
parent 8eea7fc1b5
commit 736b03825e
1 changed files with 17 additions and 12 deletions

View File

@ -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='''<!DOCTYPE html>
<html lang="en">
<head>
@ -95,7 +99,8 @@ for ((page=1;page<=pageno;page++)); do
echo -n "<a class=\"button\" href=\"index.$link.html\">$link</a> "
fi
done
echo '</div><hr>')
echo '</div><hr>'
)
echo "$htmlpagenumbers" >> "$siteroot/index.$page.html"
sed -i "s%<!--pageno-->%$htmlpagenumbers%" "$siteroot/index.$page.html"
echo '</body></html>' >> "$siteroot/index.$page.html"