2008-06-26 19:16:07 -06:00
|
|
|
Content-Type: text/xml; charset=utf-8
|
|
|
|
|
2008-09-30 07:28:48 -06:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
2008-09-25 03:06:14 -06:00
|
|
|
%{
|
|
|
|
fn statpost {
|
|
|
|
f = $1
|
|
|
|
uri = `{echo $f | sed 's,^'$sitedir',,'}
|
|
|
|
title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
|
|
|
|
date=`{/bin/date -Rd `{basename $f |sed 's/(^[0-9\-]*).*/\1/; s/-[0-9]$//'}}
|
|
|
|
# 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
|
|
|
|
uri=$baseuri^`{cleanname `{echo -n $uri | sed 's/\.(md|tpl)//g'}}
|
|
|
|
by=$stat(2)
|
|
|
|
ifs=() {
|
|
|
|
summary=`{awk -v max'='1024 '{
|
|
|
|
nc += 1 + length;
|
|
|
|
if(nc > max) {
|
|
|
|
print substr($0, 1, nc - max) "..."
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
print
|
|
|
|
}' $f |fmt -j| sed 's/\]\]>/Fucking goddamn XML garbage/g'}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
%}
|
|
|
|
|
2008-06-26 19:16:07 -06:00
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
|
<channel>
|
|
|
|
<atom:link href="%('http://'$site^$REQUEST_URI%)" rel="self" type="application/rss+xml" />
|
|
|
|
<title>%($siteTitle%)</title>
|
|
|
|
<link>%($uri%)</link>
|
|
|
|
<description>%($blogDesc%)</description>
|
|
|
|
<language>en-us</language>
|
|
|
|
<generator>Tom Duff's rc, and Kris Maglione's clever hackery</generator>
|
|
|
|
%{
|
2008-09-26 02:35:12 -06:00
|
|
|
# <webMaster>uriel99+rss@gmail.com (Uriel)</webMaster>
|
2008-06-26 19:16:07 -06:00
|
|
|
for(f in `{sortedBlogPostList $blogDirs}) {
|
|
|
|
statpost $f
|
2008-08-26 21:27:40 -06:00
|
|
|
# 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
|
|
|
|
#}
|
2008-07-11 23:58:04 -06:00
|
|
|
%}
|
|
|
|
<item>
|
2008-06-26 19:16:07 -06:00
|
|
|
<title>%($title%)</title>
|
|
|
|
<author>%($by%)@noreply.cat-v.org (%($by%))</author>
|
|
|
|
<link>%($uri%)</link>
|
|
|
|
<guid isPermaLink="true">%($uri%)</guid>
|
|
|
|
<pubDate>%($date%)</pubDate>
|
|
|
|
<description><![CDATA[<pre>%($summary%)</pre>]]></description>
|
|
|
|
</item>
|
|
|
|
% }
|
2008-07-11 23:58:04 -06:00
|
|
|
|
2008-06-26 19:16:07 -06:00
|
|
|
</channel>
|
|
|
|
</rss>
|