2009-01-25 08:52:19 -07:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
%{
|
2009-02-15 07:50:50 -07:00
|
|
|
# See for more info:http://www.tbray.org/ongoing/When/200x/2005/07/27/Atomic-RSS
|
2009-01-25 08:52:19 -07:00
|
|
|
fn statpost {
|
|
|
|
f = $1
|
|
|
|
|
2016-02-10 18:33:27 -07:00
|
|
|
updated = `{datet `{mtime $f | awk '{print $1}'}}
|
2009-02-20 16:15:08 -07:00
|
|
|
post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/'
|
2009-01-25 08:52:19 -07:00
|
|
|
title=`{read $f/index.md}
|
|
|
|
# Not used: 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)
|
2016-02-04 13:05:05 -07:00
|
|
|
#stat=`{stat -c '%Y %U' $f}
|
2009-01-25 08:52:19 -07:00
|
|
|
#mdate=`{/bin/date -Rd `{mtime $f|awk '{print $1}' }} # Not used because it is unreliable
|
2016-02-04 13:05:05 -07:00
|
|
|
by=`{ls -m $f | sed 's/^\[//g; s/].*$//g' >[2]/dev/null}
|
2009-02-15 07:50:50 -07:00
|
|
|
#ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } }
|
2009-06-13 07:59:43 -06:00
|
|
|
ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } }
|
2009-01-25 08:52:19 -07:00
|
|
|
}
|
2016-02-10 18:33:27 -07:00
|
|
|
updated = `{datet}
|
2009-01-25 08:52:19 -07:00
|
|
|
%}
|
|
|
|
|
|
|
|
<feed xmlns="http://www.w3.org/2005/Atom"
|
|
|
|
xmlns:thr="http://purl.org/syndication/thread/1.0">
|
|
|
|
|
2009-07-19 22:01:36 -06:00
|
|
|
% if(! ~ $"conf_blog_pubsubdub_hub '') {
|
|
|
|
% echo '<link rel="hub" href="'$conf_blog_pubsubdub_hub'" />'
|
2009-07-18 19:27:26 -06:00
|
|
|
% }
|
|
|
|
|
2009-02-18 02:28:20 -07:00
|
|
|
<link rel="self" href="%($base_url^$req_path%)"/>
|
|
|
|
<id>%($base_url^$req_path%)</id>
|
2016-02-04 13:05:05 -07:00
|
|
|
<icon><![CDATA[/favicon.ico]]></icon>
|
2009-01-25 08:52:19 -07:00
|
|
|
|
2016-02-04 13:05:05 -07:00
|
|
|
<title><![CDATA[%($siteTitle%)]]></title>
|
|
|
|
<subtitle><![CDATA[%($siteSubTitle%)]]></subtitle>
|
2009-01-25 08:52:19 -07:00
|
|
|
|
2009-02-15 07:50:50 -07:00
|
|
|
% # <updated>2008-09-24T12:47:00-04:00</updated>
|
2009-01-25 08:52:19 -07:00
|
|
|
<updated>%($updated%)</updated>
|
|
|
|
<link href="."/>
|
|
|
|
|
2009-02-15 07:50:50 -07:00
|
|
|
% for(f in `{get_post_list $blagh_root$blagh_dirs}) {
|
|
|
|
% statpost $f
|
|
|
|
|
2009-01-25 08:52:19 -07:00
|
|
|
<entry>
|
2009-02-15 07:50:50 -07:00
|
|
|
% # Maybe we should be smarter, see: http://diveintomark.org/archives/2004/05/28/howto-atom-id, example: <id>tag:intertwingly.net,2004:2899</id>
|
2009-01-25 08:52:19 -07:00
|
|
|
<id>%($post_uri%)</id>
|
|
|
|
<link href="%($post_uri%)"/>
|
2016-02-04 13:05:05 -07:00
|
|
|
<title><![CDATA[%($title%)]]></title>
|
2009-02-15 07:50:50 -07:00
|
|
|
% # <link rel="replies" href="2899.atom" thr:count="0"/>
|
2016-02-04 13:05:05 -07:00
|
|
|
<author><name><![CDATA[%($by%)]]></name></author>
|
2009-01-25 08:52:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
|
2016-02-04 13:05:05 -07:00
|
|
|
<![CDATA[%($summary%)]]>
|
2009-01-25 08:52:19 -07:00
|
|
|
</div></content>
|
|
|
|
|
|
|
|
<updated>%($updated%)</updated>
|
|
|
|
</entry>
|
|
|
|
|
2009-02-15 07:50:50 -07:00
|
|
|
% }
|
2009-01-25 08:52:19 -07:00
|
|
|
|
|
|
|
</feed>
|
|
|
|
|
|
|
|
% exit
|