From dd75b4a341925e4ba3408b018941241d4317dd9f Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Mon, 7 Jun 2021 21:47:07 -0400 Subject: updated with cgi scripts to create on-the-fly rss and index --- Makefile | 20 +---- cgi-bin/cv.sh | 6 ++ cgi-bin/index.sh | 82 +++++++++++++++++ cgi-bin/rss.sh | 28 ++++++ index.html | 98 --------------------- info.html | 37 ++++---- out.pdf | Bin 0 -> 603736 bytes ...-21-dancing-the-shag-and-the-new-lion-king.html | 19 ++-- ...-a-bamf-and-proof-that-organists-are-metal.html | 5 +- rss.xml | 42 --------- 10 files changed, 152 insertions(+), 185 deletions(-) create mode 100755 cgi-bin/cv.sh create mode 100755 cgi-bin/index.sh create mode 100755 cgi-bin/rss.sh delete mode 100644 index.html create mode 100644 out.pdf delete mode 100644 rss.xml diff --git a/Makefile b/Makefile index 3f7c13c..f7acbd1 100644 --- a/Makefile +++ b/Makefile @@ -2,23 +2,8 @@ EDITOR = $$EDITOR POST_T = templates/template.html -INDEX_HEAD_T = templates/index_head.html -INDEX_FOOT_T = templates/index_foot.html -RSS_HEAD_T = templates/rss_head.xml -RSS_FOOT_T = templates/rss_foot.xml -all: index.html rss.xml cv.pdf - -index.html: posts/*.html - @grep h1 $> | sort -r | sed 's#^\(posts/\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\)[^:]*\):[ \t]*

\(.*\)

#
  • \3 \2
  • #' | cat $(INDEX_HEAD_T) - $(INDEX_FOOT_T) > index.html - -rss.xml: posts/*.html - @grep h1 $> | sort -r | sed 's#^\(posts/[^:]*\):[ \t]*

    \(.*\)

    #\2https://www.53hor.net/posts/\1#' | cat $(RSS_HEAD_T) - $(RSS_FOOT_T) > rss.xml - -cv.pdf: cv.html - @mutool convert -o cv.pdf cv.html - -.PHONY: serve post clean +.PHONY: serve post serve: python3.7 -m http.server 3000 @@ -30,6 +15,3 @@ post: cp $(POST_T) $$FILENAME; \ sed -i '' "s/{{ title }}/$$TITLE/g" $$FILENAME; \ $$EDITOR $$FILENAME - -clean: - rm -f index.html rss.xml diff --git a/cgi-bin/cv.sh b/cgi-bin/cv.sh new file mode 100755 index 0000000..b61e9b3 --- /dev/null +++ b/cgi-bin/cv.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Converts CV to downloadable PDF. + +printf 'content-type: application/pdf\n\n' +mutool convert -F pdf cv.html diff --git a/cgi-bin/index.sh b/cgi-bin/index.sh new file mode 100755 index 0000000..3fea5c9 --- /dev/null +++ b/cgi-bin/index.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +# Generates a site index from posts and pages. + +cat << EOH +content-type: text/html + + + + + + + + + + + + + + 53hornet ➙ Home + + + + + +
    + +
    + +
    +

    + The World Wide Web pages of Adam Carpenter (53hornet) +

    +
    ' diff --git a/cgi-bin/rss.sh b/cgi-bin/rss.sh new file mode 100755 index 0000000..6987745 --- /dev/null +++ b/cgi-bin/rss.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# Generates an RSS feed from all posts. + +cat << EOH +content-type: application/xml + + + + + + 53hornet's Feed + https://www.53hor.net + + The World Wide Web pages of Adam Carpenter + + https://www.53hor.net/includes/logo_diag.png + 53hornet's Feed + https://www.53hor.net + +EOH + +grep '

    ' posts/*\ + | sort -r\ + | sed -e 's#h1#title#g' -e 's#:##' -e 's#$##' -e 's#^#https://www.53hor.net/#' + +echo '' + diff --git a/index.html b/index.html deleted file mode 100644 index 8e623a2..0000000 --- a/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - 53hornet ➙ Home - - - - - -
    - -
    - -
    -

    - The World Wide Web pages of Adam Carpenter (53hornet) -

    - -
    - - diff --git a/info.html b/info.html index 924d803..b3ae26d 100644 --- a/info.html +++ b/info.html @@ -30,7 +30,10 @@
  • - information + information Info
  • @@ -68,7 +71,7 @@

    You can find my CV here. If you want a PDF you - can get that here. + can get that here.

    @@ -245,29 +248,23 @@ + -

    - - Valid CSS! - -

    + Valid CSS! -

    - Viewable With Any Browser -

    + Viewable With Any Browser diff --git a/out.pdf b/out.pdf new file mode 100644 index 0000000..c8f9106 Binary files /dev/null and b/out.pdf differ diff --git a/posts/2019-07-21-dancing-the-shag-and-the-new-lion-king.html b/posts/2019-07-21-dancing-the-shag-and-the-new-lion-king.html index 9ca4e97..8fb1dfb 100644 --- a/posts/2019-07-21-dancing-the-shag-and-the-new-lion-king.html +++ b/posts/2019-07-21-dancing-the-shag-and-the-new-lion-king.html @@ -8,12 +8,18 @@ property="og:description" content="The World Wide Web pages of Adam Carpenter" /> - + - + - 53hornet ➙ Dancing the Shag & Two Left Feet + 53hornet ➙ Dancing the Shag & The [New] Lion King @@ -27,7 +33,10 @@
  • - information + information Info
  • @@ -53,7 +62,7 @@
    -

    Dancing the Shag & Two Left Feet

    +

    Dancing the Shag & The [New] Lion King

    Not all of my posts are huge, and they probably shouldn't be. Amy and I had a really great time yesterday at Two Left Feet Dance Studio, diff --git a/posts/2021-02-12-louis-vierne-is-a-bamf-and-proof-that-organists-are-metal.html b/posts/2021-02-12-louis-vierne-is-a-bamf-and-proof-that-organists-are-metal.html index 2e7a528..d0f2938 100644 --- a/posts/2021-02-12-louis-vierne-is-a-bamf-and-proof-that-organists-are-metal.html +++ b/posts/2021-02-12-louis-vierne-is-a-bamf-and-proof-that-organists-are-metal.html @@ -35,7 +35,10 @@

  • - information + information Info
  • diff --git a/rss.xml b/rss.xml deleted file mode 100644 index d704b7b..0000000 --- a/rss.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - 53hornet's Feed - https://www.53hor.net - - The World Wide Web pages of Adam Carpenter - - https://www.53hor.net/includes/logo_diag.png - 53hornet's Feed - https://www.53hor.net - -Web Designers, Please Don't "Animate" Page Titleshttps://www.53hor.net/posts/posts/2021-05-23-web-designers-please-don-t-animate-page-titles.html -How to Make Your Website Boring and Why!https://www.53hor.net/posts/posts/2021-04-20-how-to-make-your-website-boring-and-why.html -How to Automate Certbot Renewal with HAProxyhttps://www.53hor.net/posts/posts/2021-03-19-how-to-automate-certbot-renewal-with-haproxy.html -Louis Vierne Is a BAMF (and Proof That Organists Are Metal)https://www.53hor.net/posts/posts/2021-02-12-louis-vierne-is-a-bamf-and-proof-that-organists-are-metal.html -Undefined? JavaSript Is Undefined.https://www.53hor.net/posts/posts/2021-01-28-undefined-javasript-is-undefined.html -Root on ZFS: A ZPool of Mirror VDEVshttps://www.53hor.net/posts/posts/2021-01-15-root-on-zfs-a-zpool-of-mirror-vdevs-the-easy-way.html -Adam's <del>2020</del> <ins>Quarantine</ins> Reading Listhttps://www.53hor.net/posts/posts/2021-01-15-adam-s-2020-reading-list.html -Antivirus Software is a Hackhttps://www.53hor.net/posts/posts/2020-12-29-antivirus-software-is-a-hack.html -Why Does Everyone Use Adobe Acrobat [Reader]?https://www.53hor.net/posts/posts/2020-12-22-why-does-everyone-use-adobe-acrobat-reader.html -Useful Sprint Planning from a Certified Scrum Masterhttps://www.53hor.net/posts/posts/2020-12-08-useful-sprint-planning-from-a-certified-scrum-master.html -AOC 2020 Day 1 in CBM Basichttps://www.53hor.net/posts/posts/2020-12-04-aoc-2020-day-1-in-cbm-basic.html -𝔗𝔥𝔢 𝔊𝔲𝔦𝔡𝔢𝔰https://www.53hor.net/posts/posts/2020-12-01-the-guides.html -Titanic's Last Signalshttps://www.53hor.net/posts/posts/2020-11-30-titanics-last-signals.html -Now This is a Minimal Install!https://www.53hor.net/posts/posts/2020-07-26-now-this-is-a-minimal-install.html -Why Computer Science at William and Maryhttps://www.53hor.net/posts/posts/2020-07-11-why-computer-science-at-w-m.html -Wedding Photo Debaclehttps://www.53hor.net/posts/posts/2020-04-10-wedding-photos-are-here.html -Obligatory COVID-19 Posthttps://www.53hor.net/posts/posts/2020-04-10-the-obligatory-covid-19-post.html -How I Do Data Recoveryhttps://www.53hor.net/posts/posts/2019-09-28-my-preferred-method-for-data-recovery.html -Left Lane is for Passing, Not Cruisinghttps://www.53hor.net/posts/posts/2019-08-30-keep-right-except-to-pass.html -I Married My Best Friend!https://www.53hor.net/posts/posts/2019-08-11-marrying-my-best-friend.html -Finally Found a Drink I Likehttps://www.53hor.net/posts/posts/2019-07-28-i-finally-found-a-drink-i-like.html -Dancing the Shag & Two Left Feethttps://www.53hor.net/posts/posts/2019-07-21-dancing-the-shag-and-the-new-lion-king.html -YABS: Yet Another Bad Shophttps://www.53hor.net/posts/posts/2019-07-04-yabs-yet-another-bad-shop.html -Offloading GoPro Footage the Easy Way!https://www.53hor.net/posts/posts/2019-07-04-the-best-way-to-transfer-gopro-files-with-linux.html -How to Start and Drive a Hudson Hornethttps://www.53hor.net/posts/posts/2019-06-07-how-to-start-and-drive-a-hudson-hornet.html -Why Have a Web Site in 2019?https://www.53hor.net/posts/posts/2019-04-06-why-have-a-website-in-2019.html - - - -- cgit v1.2.3