summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2021-04-24 21:34:21 -0400
committerAdam T. Carpenter <atc@53hor.net>2021-04-24 21:34:21 -0400
commitfcfee3b3031cc03c373b822fb40b3d966fe46255 (patch)
tree6e8520b64ca32e3a02f70edb0e5bb37e6bb64caa /Makefile
parent484caec3ff5d9865ebc4e66711ef86e6bcbb094f (diff)
download53hor-make.tar.xz
53hor-make.zip
finished CV 1.0, added some infomake
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 8df6ceb..b306956 100644
--- a/Makefile
+++ b/Makefile
@@ -7,9 +7,18 @@ INDEX_FOOT_T = templates/index_foot.html
RSS_HEAD_T = templates/rss_head.xml
RSS_FOOT_T = templates/rss_foot.xml
-.PHONY: serve post clean
+all: index.html rss.xml cv.pdf
+
+index.html: posts/*.html
+ @grep h1 $> | sort -r | sed 's#^\(posts/\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\)[^:]*\):[ \t]*<h1>\(.*\)</h1>#<li><a href="/\1">\3 <code>\2</code></a></li>#' | cat $(INDEX_HEAD_T) - $(INDEX_FOOT_T) > index.html
-all: index.html rss.xml
+rss.xml: posts/*.html
+ @grep h1 $> | sort -r | sed 's#^\(posts/[^:]*\):[ \t]*<h1>\(.*\)</h1>#<item><title>\2</title><link>https://www.53hor.net/posts/\1</link></item>#' | cat $(RSS_HEAD_T) - $(RSS_FOOT_T) > rss.xml
+
+cv.pdf: cv.html
+ @mutool convert -o cv.pdf cv.html
+
+.PHONY: serve post clean
serve:
python3.7 -m http.server 3000
@@ -24,11 +33,5 @@ post:
sed -i '' "s/{{ title }}/$$TITLE/g" $$FILENAME; \
$EDITOR $$FILENAME
-index.html: posts/*.html
- @grep h1 $> | sort -r | sed 's#^\(posts/\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\)[^:]*\):[ \t]*<h1>\(.*\)</h1>#<li><a href="/\1">\3 <code>\2</code></a></li>#' | cat $(INDEX_HEAD_T) - $(INDEX_FOOT_T) > index.html
-
-rss.xml: posts/*.html
- @grep h1 $> | sort -r | sed 's#^\(posts/[^:]*\):[ \t]*<h1>\(.*\)</h1>#<item><title>\2</title><link>https://www.53hor.net/posts/\1</link></item>#' | cat $(RSS_HEAD_T) - $(RSS_FOOT_T) > rss.xml
-
clean:
rm -f index.html rss.xml