diff options
Diffstat (limited to 'rss.xml')
-rwxr-xr-x | rss.xml | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -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 |