summaryrefslogtreecommitdiff
path: root/site/rss.xml
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-21 11:05:15 +0200
committerdavidovski <david@davidovski.xyz>2023-08-09 02:42:03 +0100
commitf298c481fd08b58a26e17b1c36ced8128440dbf7 (patch)
tree322bb1788fdf4c4f6a5c43fc33200c5cb7647810 /site/rss.xml
parent9ac6c99826fc6a4deacd1fb2ead47920cf66cdcd (diff)
move non-executables to site subdir
Diffstat (limited to 'site/rss.xml')
-rwxr-xr-xsite/rss.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/site/rss.xml b/site/rss.xml
new file mode 100755
index 0000000..d2ec426
--- /dev/null
+++ b/site/rss.xml
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+cat << EOF
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0">
+
+<channel>
+ <title>davidovski</title>
+ <link>https://davidovski.xyz</link>
+ <description>davidovski's site</description>
+EOF
+
+for entry in entries/*.html; do
+ title="$(grep '^# ' $entry)"
+ title=${title#\# }
+
+ printf "<item>\n"
+ printf "<title>%s</title>\n" "${title}"
+ printf "<link>%s</link>\n" "http://davidovski.xyz/$entry"
+ printf "<pubDate>%s</pubDate>\n" "$(stat -c %z "$entry")"
+
+
+ printf "<description><![CDATA["
+ md2html $entry
+ printf "]]></description>\n</item>"
+
+ done
+
+
+cat << EOF
+</channel>
+</rss>
+EOF