diff options
author | Adam T. Carpenter <atc@53hor.net> | 2021-06-07 21:47:07 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2021-06-07 21:47:07 -0400 |
commit | dd75b4a341925e4ba3408b018941241d4317dd9f (patch) | |
tree | 58803a50c84b2ec2278a88186ccbfabba3399f8f /Makefile | |
parent | c1abd776510d69f6f35ef449875c48b46a5ca95a (diff) | |
download | 53hor-dd75b4a341925e4ba3408b018941241d4317dd9f.tar.xz 53hor-dd75b4a341925e4ba3408b018941241d4317dd9f.zip |
updated with cgi scripts to create on-the-fly rss and index
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -2,23 +2,8 @@ EDITOR = $$EDITOR POST_T = templates/template.html -INDEX_HEAD_T = templates/index_head.html -INDEX_FOOT_T = templates/index_foot.html -RSS_HEAD_T = templates/rss_head.xml -RSS_FOOT_T = templates/rss_foot.xml -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 - -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 +.PHONY: serve post serve: python3.7 -m http.server 3000 @@ -30,6 +15,3 @@ post: cp $(POST_T) $$FILENAME; \ sed -i '' "s/{{ title }}/$$TITLE/g" $$FILENAME; \ $$EDITOR $$FILENAME - -clean: - rm -f index.html rss.xml |