# Written for FreeBSD make(1), or pmake. Not tested with GNU make. TEMPLATE = templates/template.html .PHONY: serve post serve: python3.7 -m http.server 3000 profile/adamcarpenter.pdf: profile/adamcarpenter.html touch profile/adamcarpenter.pdf post: @read -p "Title: " TITLE; \ read -p "Category: " CATEGORY; \ SHORT_DATE=`date +"%Y-%m-%d"`; \ LONG_DATE=`date +"%a, %d %b %Y"`; \ mkdir -p posts/$$CATEGORY; \ FILENAME=posts/$$CATEGORY/$$SHORT_DATE-`echo $$TITLE | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \ cp $(TEMPLATE) $$FILENAME; \ sed -i '' "s/{{ title }}/$$TITLE/g" $$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#