From 4a2c068ec080cc95b8fbfcfcf1781b492cbe034f Mon Sep 17 00:00:00 2001 From: dtb Date: Sun, 6 Aug 2023 17:16:37 -0400 Subject: [PATCH] 2023-08-06 --- homepage/homepage | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/homepage/homepage b/homepage/homepage index 92f8d9d..c25cc78 100755 --- a/homepage/homepage +++ b/homepage/homepage @@ -1926,6 +1926,75 @@ If I don't, escalate the issue to the host of this site (this can also be found +/blah/2023-08-06.html + +The blah/ works now as well as it did early July, but is based on homepage, my +fucky single file static site generator. This was something I needed to take +care of before I left or I wouldn't get around to it; if I'm using some shitty +interface to edit the git repository instead of good old UNIX (which may happen +if my tech breaks down) I don't wanna figure out how to manage directories and +new files and stuff. I just want to edit the same old file and hope the web +interface doesn't fuck everything up. Granted, I don't know if Sourcehut has a +web interface. So that could be like 50 hours of work down the drain. But I'm +happy with homepage and it's another quirky little project of mine. + + +/homepage.local verbatim + +#!/bin/sh + +set -x + +for f in ./blah/*.html +do + awk ' +BEGIN { n = 0; } +/^\$!NAVIGATION$/ { + if(++n == 1){ + print $0 "\n\n" substr(FILENAME, 8, 10) "\n" + }else + print "\n" $0; +} +!/^\$!NAVIGATION$/ { print $0 } +' "$f" >"$f.tmp" \ + && mv "$f.tmp" "$f" \ + || rm "$f.tmp" + f="$(printf '%s\n' "$f" | sed -e 's,./blah/,,' -e 's,\.html$,,')" + test -n "$last" \ + && sed -i "./blah/$last.html" \ + -e "s,\$!NAVIGATION,$nav\>,g" \ + && nav="\<" \ + || true + nav="$nav^" + last="$f" +done +sed -i "s,\$!NAVIGATION,$nav,g" "./blah/$last.html" + +ls ./blah/*.html \ + | sed -e 's_.*/__g' \ + -e 's/\.html$//g' \ + | sort -r \ + | tee ./feed.xml \ + | sed -e 's_.*_&_g' \ + -e "1i\ +blah\ +
.." \
+		-e '$a
' \ + >./blah/index.html + +sed -i feed.xml \ + -e "1i\ +\ +trinity.moe/blahhttps://trinity.moe/blah\ +$(date)" \ + -e "s,^....-..-..\$,\ +&\ +https://trinity.moe/blah/&.html\ +blah post for &\ +&," \ + -e '$a' + + /blah/2023-08-05.html On August 19 I'm taking a Greyhound away from Lewiston, Maine and I'm probably