blob: 2f822c006e84ddfcb5c117fcf45d235580af84e1 (
plain) (
tree)
|
|
# 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
serve: all
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
@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; \
cp $(TEMPLATE) $$FILENAME; \
$$EDITOR $$FILENAME; \
|