summaryrefslogblamecommitdiff
path: root/Makefile
blob: 6a2651066a666a3dcbd6686bf44feed0795f070b (plain) (tree)























                                                                                                                                                                        
# 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\
	<item> <title>$$TITLE</title> <link>https://www.53hor.net/$$FILENAME</link> <guid>https://www.53hor.net/$$FILENAME</guid> <pubDate>$$LONG_DATE</pubDate> </item>
	' rss.xml