From a6427320c09cd17f6be14090db1bd6446f54b4b1 Mon Sep 17 00:00:00 2001 From: gnat Date: Sun, 28 Jul 2024 11:12:01 -0700 Subject: [PATCH] add footer support, make include script --- changelog | 1 + dir_index.html | 3 ++- home.html | 3 ++- html/I-dont-like-IT.html | 3 ++- html/albert-hack-1.html | 3 ++- html/blog/index.html | 3 ++- html/blog/posts/2024-05-03-kingwood-maintenance.html | 5 +++-- html/blog/posts/new-laptop.html | 3 ++- html/blog/posts/test-post.html | 3 ++- html/cool-sites.html | 3 ++- html/discord.html | 3 ++- html/my-laptop.html | 3 ++- html/natalie-info.html | 3 ++- html/natalie-sightings.html | 5 +++-- html/random-thoughts.html | 7 ++++--- html/server-migration.html | 3 ++- html/site-info.html | 3 ++- html/stats.html | 5 +++-- scripts/include | 3 +++ 19 files changed, 43 insertions(+), 22 deletions(-) create mode 100755 scripts/include diff --git a/changelog b/changelog index e6129d7..3b21aa3 100644 --- a/changelog +++ b/changelog @@ -22,3 +22,4 @@ 2024-07-27: Update style on non blog posts 2024-07-27: modernize /html/site-info.html, finally 2024-07-27: improve image accessibility, update blog posts to be compliant with new style +2024-07-28: add support for planned footer in all relevant html documents, simplify inclusion of other documents in a document using include script diff --git a/dir_index.html b/dir_index.html index 75010b8..76568f8 100644 --- a/dir_index.html +++ b/dir_index.html @@ -10,7 +10,7 @@ - $[python3 -u -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Index of {path}

@@ -23,5 +23,6 @@
+ $[include html/footer.html] diff --git a/home.html b/home.html index 283e55d..b0bb5ea 100644 --- a/home.html +++ b/home.html @@ -34,7 +34,7 @@ $[echo visit >> files/home_visit_counter] Natalie website - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

@@ -90,6 +90,7 @@ $[echo visit >> files/home_visit_counter] $[ls -r ./files/posts-to-homepage/* | while read -r file; do echo "

$(cat $file)
"; done ]
+ $[include html/footer.html]
diff --git a/html/I-dont-like-IT.html b/html/I-dont-like-IT.html index 7c4fc9e..57d2948 100644 --- a/html/I-dont-like-IT.html +++ b/html/I-dont-like-IT.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

My school district's IT is mean :(

@@ -114,5 +114,6 @@
+ $[include html/footer.html] diff --git a/html/albert-hack-1.html b/html/albert-hack-1.html index a32de34..8bb13af 100644 --- a/html/albert-hack-1.html +++ b/html/albert-hack-1.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Friend hacked my website lol

@@ -27,5 +27,6 @@

+ $[include html/footer.html] diff --git a/html/blog/index.html b/html/blog/index.html index 95cd4fa..66afe68 100644 --- a/html/blog/index.html +++ b/html/blog/index.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

My subunit of the blogosphere

@@ -24,5 +24,6 @@
+ $[include html/footer.html] diff --git a/html/blog/posts/2024-05-03-kingwood-maintenance.html b/html/blog/posts/2024-05-03-kingwood-maintenance.html index b9ed34b..da88512 100644 --- a/html/blog/posts/2024-05-03-kingwood-maintenance.html +++ b/html/blog/posts/2024-05-03-kingwood-maintenance.html @@ -14,7 +14,7 @@ Belt sander maintenance - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

I fixed cool equipment my school has

@@ -41,6 +41,7 @@
-
+ $[include html/footer.html] diff --git a/html/blog/posts/new-laptop.html b/html/blog/posts/new-laptop.html index e038cc8..b221dd8 100644 --- a/html/blog/posts/new-laptop.html +++ b/html/blog/posts/new-laptop.html @@ -7,7 +7,7 @@ My Framework 16 arrived :) - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

I got my Framework 16.

@@ -27,5 +27,6 @@

+ $[include html/footer.html] diff --git a/html/blog/posts/test-post.html b/html/blog/posts/test-post.html index 8a80e61..5511798 100644 --- a/html/blog/posts/test-post.html +++ b/html/blog/posts/test-post.html @@ -7,12 +7,13 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Wowee! a blogpost

aoeu
+ $[include html/footer.html] diff --git a/html/cool-sites.html b/html/cool-sites.html index d49febf..39f7b91 100644 --- a/html/cool-sites.html +++ b/html/cool-sites.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Websites that I think are interesting or just odd, with varying obscurity and in no particular order

@@ -39,5 +39,6 @@ albert: iso-9995-9.com (down? dns issue maybe)
+ $[include html/footer.html] diff --git a/html/discord.html b/html/discord.html index 22aec90..1f5ae9d 100644 --- a/html/discord.html +++ b/html/discord.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Discord

@@ -16,5 +16,6 @@ This is not a very nice state of things.
+ $[include html/footer.html] diff --git a/html/my-laptop.html b/html/my-laptop.html index ccae6d2..826dab3 100644 --- a/html/my-laptop.html +++ b/html/my-laptop.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

DEPRECATED My laptop

@@ -97,6 +97,7 @@ bindsym a mode a
+ $[include html/footer.html]
diff --git a/html/natalie-info.html b/html/natalie-info.html index 774efbd..fb1495d 100644 --- a/html/natalie-info.html +++ b/html/natalie-info.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

What is a "natalie?"

@@ -75,5 +75,6 @@ 20 50 Cassyette
+ $[include html/footer.html] diff --git a/html/natalie-sightings.html b/html/natalie-sightings.html index 0a69bbf..3efd7c3 100644 --- a/html/natalie-sightings.html +++ b/html/natalie-sightings.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Natalie Sightings

@@ -16,6 +16,7 @@
$[for file in files/natalie-sightings/*; do echo "$(img-caption "/$file")"; done]
-
+
+ $[include html/footer.html] diff --git a/html/random-thoughts.html b/html/random-thoughts.html index aac931e..aea875b 100644 --- a/html/random-thoughts.html +++ b/html/random-thoughts.html @@ -1,19 +1,20 @@ - Natalie information + Natalie "thoughts" - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

arbitrary thoughts generated by natalie

I am bad at thinking of things to make blog posts for. this webpage might contain things that I would put in a blog post if I was more proficient at writing filler. It might also contain other things.
- $[stat -c "%W %n" ./html/thoughts/* | sort -n --reverse | cut -d ' ' -f2- | while read -r file; do echo "
$(stat -c'%w' $file | cut -d '.' -f1): $(grep '^$//')
$(python -c "import utils; print(utils.parse_file('$file'))")
"; done] + $[stat -c "%W %n" ./html/thoughts/* | sort -n --reverse | cut -d ' ' -f2- | while read -r file; do echo "
$(stat -c'%w' $file | cut -d '.' -f1): $(grep '^$//')
$(include $file)
"; done]
+ $[include html/footer.html] diff --git a/html/server-migration.html b/html/server-migration.html index 41d67f5..3dad3f2 100644 --- a/html/server-migration.html +++ b/html/server-migration.html @@ -7,7 +7,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

This website runs on a big server now.

@@ -40,5 +40,6 @@
+ $[include html/footer.html] diff --git a/html/site-info.html b/html/site-info.html index 16ad9f0..ea5af24 100644 --- a/html/site-info.html +++ b/html/site-info.html @@ -4,7 +4,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\$PREV_URL\$/"{prev}"/'] + $[include html/header.html]

Information about this website

@@ -59,5 +59,6 @@

+ $[include html/footer.html] diff --git a/html/stats.html b/html/stats.html index e3532a1..93fe07f 100644 --- a/html/stats.html +++ b/html/stats.html @@ -5,7 +5,7 @@ - $[python3 -c 'import utils; print(utils.parse_file("html/header.html"))' | sed 's/\\$PREV_URL\\$/".."/'] + $[include html/header.html]

Stats! Data! Wow!

@@ -14,8 +14,9 @@

Currently available information:

- $[for line in $(cat main.py | grep Route -A1 | grep '/stats/' | sed "s/'//g; s/,//g"); do echo "$(make-link $line)
"; done] + $[for line in $(cat main.py | grep Route -A1 | grep '/stats/' | sed "s/'//g; s/,//g"); do echo "$(make-link $line)"; done]
+ $[include html/footer.html] diff --git a/scripts/include b/scripts/include new file mode 100755 index 0000000..697ff01 --- /dev/null +++ b/scripts/include @@ -0,0 +1,3 @@ +#!/bin/sh + +python3 -u -c "import utils; print(utils.parse_file('$1'))" | sed 's/\$PREV_URL\$/"{prev}"/'