summaryrefslogtreecommitdiff
path: root/rss.xml
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-06-13 00:12:02 +0100
committerdavidovski <david@davidovski.xyz>2023-06-13 00:12:02 +0100
commit045ab662bb15d9a13d4d58ef609f643b9ae0889d (patch)
treeecf6a75bb9c9aa530bf5e7cca909c9b8894fd690 /rss.xml
parent7acbb084388e3b7d13f37b65e0b5cf2756d6cf26 (diff)
use shblg to generate a static site from this repo
Diffstat (limited to 'rss.xml')
-rwxr-xr-xrss.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/rss.xml b/rss.xml
new file mode 100755
index 0000000..d2ec426
--- /dev/null
+++ b/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