summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-29 08:53:22 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-29 08:53:22 -0500
commitaa6ade8c1bc51bc8f379442bb00710438d1385fd (patch)
treed0a99de1f2ceec24c6fe15d61661f96a33a05d3b /Makefile
parentdaa21252743400c83f9d46c7fdefc00058553d7f (diff)
download53hor-aa6ade8c1bc51bc8f379442bb00710438d1385fd.tar.xz
53hor-aa6ade8c1bc51bc8f379442bb00710438d1385fd.zip
organized posts, added profile, started makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
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\
+ <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
+