%{ # See for more info:http://www.tbray.org/ongoing/When/200x/2005/07/27/Atomic-RSS fn statpost { f = $1 updated = `{date -t `{mtime $f | awk '{print $1}'}} # wtf doesn't this validate? post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' title=`{read $f/index.md} #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 = `{ndate -t} %} % if(! ~ $"conf_blog_pubsubdub_hub '') { % echo '' % } %($base_url^$req_path%) <![CDATA[%($siteTitle%)]]> %($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%)]]> % # %($summary%) %($updated%) % } % exit