%{ # See for more info:http://www.tbray.org/ongoing/When/200x/2005/07/27/Atomic-RSS fn statpost { f = $1 updated = `{datet `{mtime $f | awk '{print $1}'}} post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' 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) #stat=`{stat -c '%Y %U' $f} #mdate=`{/bin/date -Rd `{mtime $f|awk '{print $1}' }} # Not used because it is unreliable by=`{ls -m $f | sed 's/^\[//g; s/].*$//g' >[2]/dev/null} #ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } } ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } } } updated = `{datet} %} % if(! ~ $"conf_blog_pubsubdub_hub '') { % echo '' % } %($base_url^$req_path%) <![CDATA[%($siteTitle%)]]> % # 2008-09-24T12:47:00-04:00 %($updated%) % for(f in `{get_post_list $blagh_root$blagh_dirs}) { % statpost $f % # Maybe we should be smarter, see: http://diveintomark.org/archives/2004/05/28/howto-atom-id, example: tag:intertwingly.net,2004:2899 %($post_uri%) <![CDATA[%($title%)]]> % #
%($updated%)
% }
% exit