2009-01-25 08:52:19 -07:00
|
|
|
Content-Type: text/xml; charset=utf-8
|
|
|
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
%{
|
|
|
|
fn statpost {
|
2009-02-18 02:28:20 -07:00
|
|
|
f = $1
|
2009-01-25 08:52:19 -07:00
|
|
|
|
2009-02-18 02:28:20 -07:00
|
|
|
post_uri = `{echo $f | sed 's,^'$sitedir',,'}
|
|
|
|
#title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
|
2009-02-13 16:19:24 -07:00
|
|
|
title=`{read $f/index.md}
|
2009-02-18 02:28:20 -07:00
|
|
|
date=`{/bin/date -Rd `{echo $f|sed 's,.*/([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9])/.*,\1,'}}
|
|
|
|
# TODO: use mtime(1) and ls(1) instead of lunix's stat(1)
|
|
|
|
stat=`{stat -c '%Y %U' $f}
|
|
|
|
#mdate=`{/bin/date -Rd $stat(1)} # Not used because it is unreliable
|
|
|
|
post_uri=$base_url^`{cleanname `{echo -n $post_uri | sed 's/\.(md|tpl)//g'}}
|
|
|
|
by=$stat(2)
|
|
|
|
ifs=() { summary=`{cat $f/index.md | $formatter | escape_html} }
|
2009-01-25 08:52:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
2009-02-18 02:28:20 -07:00
|
|
|
<channel>
|
|
|
|
<atom:link href="%($base_url^$req_path%)" rel="self" type="application/rss+xml" />
|
|
|
|
<title>%($siteTitle%)</title>
|
|
|
|
<link>%($base_url^$req_path%)</link>
|
|
|
|
<description>%($blogDesc%)</description>
|
|
|
|
<language>en-us</language>
|
|
|
|
<generator>Tom Duff's rc, and Kris Maglione's clever hackery</generator>
|
2009-01-25 08:52:19 -07:00
|
|
|
%{
|
2009-02-18 02:28:20 -07:00
|
|
|
# <webMaster>uriel99+rss@gmail.com (Uriel)</webMaster>
|
2009-01-25 08:52:19 -07:00
|
|
|
for(f in `{get_post_list $blagh_root$blagh_dirs}) {
|
2009-02-18 02:28:20 -07:00
|
|
|
statpost $f
|
|
|
|
# Hack to aproximate the last build date
|
|
|
|
#(use the mdate from last posted item)
|
|
|
|
# Commented out for now because maybe a wrong value is worse than no value
|
|
|
|
#if(~ $#last_build_date 0) {
|
|
|
|
#last_build_date='<lastBuildDate>'^$"mdate'</lastBuildDate>'
|
|
|
|
#echo $last_build_date
|
|
|
|
#}
|
2009-01-25 08:52:19 -07:00
|
|
|
%}
|
2009-02-18 02:28:20 -07:00
|
|
|
<item>
|
|
|
|
<title>%($title%)</title>
|
|
|
|
<author>%($by%)@noreply.cat-v.org (%($by%))</author>
|
|
|
|
<link>%($post_uri%)</link>
|
|
|
|
<guid isPermaLink="true">%($post_uri%)</guid>
|
|
|
|
<pubDate>%($date%)</pubDate>
|
|
|
|
<description>%($summary%)</description>
|
|
|
|
</item>
|
|
|
|
% }
|
2009-01-25 08:52:19 -07:00
|
|
|
|
2009-02-18 02:28:20 -07:00
|
|
|
</channel>
|
2009-01-25 08:52:19 -07:00
|
|
|
</rss>
|