From aa6ade8c1bc51bc8f379442bb00710438d1385fd Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Sun, 29 Nov 2020 08:53:22 -0500 Subject: organized posts, added profile, started makefile --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6a26510 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +# simple date to RFC date: +# date -j -f "%Y-%m-%d" -R 2020-10-29 + +all: + echo done. + +serve: + python3.7 -m http.server 3000 + +resume: + echo unimplemented! + +post: + @read -p "Title: " TITLE; \ + read -p "Category: " CATEGORY; \ + SHORT_DATE=`date +"%Y-%m-%d"`; \ + LONG_DATE=`date -R`; \ + mkdir -p posts/$$category; \ + FILENAME=posts/$$category/`date +"%Y-%m-%d-"``echo $$title | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \ + $$EDITOR $$FILENAME; \ + sed -i .bak '5 a\ + $$TITLE https://www.53hor.net/$$FILENAME https://www.53hor.net/$$FILENAME $$LONG_DATE + ' rss.xml + -- cgit v1.2.3