From e9751f6b180762d9e5a67c4b2a00155b56a708bf Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Mon, 30 Nov 2020 22:52:54 -0500 Subject: interesting posts, finished make post, fixed index --- Makefile | 17 ++--- about.html | 10 +++ includes/stylesheet.css | 6 ++ index.html | 7 +- .../2020-11-30-titanic's-last-signals.html | 79 ++++++++++++++++++++++ profile/adamcarpenter.html | 19 +++++- profile/index.html | 37 ++++++++++ rss.xml | 1 + 8 files changed, 162 insertions(+), 14 deletions(-) create mode 100644 posts/interesting/2020-11-30-titanic's-last-signals.html diff --git a/Makefile b/Makefile index 2f822c0..1571a60 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,24 @@ # Written for FreeBSD make(1), or pmake. Not tested with GNU make. TEMPLATE = templates/template.html -RSS_TEMPLATE = templates/rss.xml -.PHONY: all clean serve post +.PHONY: serve post -serve: all +serve: python3.7 -m http.server 3000 -clean: - rm -f index.html - rm -f rss.xml - profile/adamcarpenter.pdf: profile/adamcarpenter.html touch profile/adamcarpenter.pdf -post: clean +post: @read -p "Title: " TITLE; \ read -p "Category: " CATEGORY; \ SHORT_DATE=`date +"%Y-%m-%d"`; \ - LONG_DATE=`date -R`; \ + LONG_DATE=`date +"%a, %d %b %Y"`; \ mkdir -p posts/$$CATEGORY; \ - FILENAME=posts/$$CATEGORY/`date +"%Y-%m-%d-"``echo $$TITLE | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \ + FILENAME=posts/$$CATEGORY/$$SHORT_DATE-`echo $$TITLE | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \ cp $(TEMPLATE) $$FILENAME; \ $$EDITOR $$FILENAME; \ + sed -i '' "s# # $$TITLE $$LONG_DATE https://www.53hor.net/$$FILENAME https://www.53hor.net/$$FILENAME \n #" rss.xml; \ + sed -i '' "s#