diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl index b691f70..049a1eb 100644 --- a/apps/blagh/atom.tpl +++ b/apps/blagh/atom.tpl @@ -24,8 +24,8 @@ updated = `{/bin/date --rfc-3339'=seconds' |sed 's/ /T/'} - - %($req_path%) + + %($base_url^$req_path%) /favicon.ico %($siteTitle%) diff --git a/apps/blagh/rss20.tpl b/apps/blagh/rss20.tpl index 3e80209..4214c35 100644 --- a/apps/blagh/rss20.tpl +++ b/apps/blagh/rss20.tpl @@ -4,60 +4,51 @@ Content-Type: text/xml; charset=utf-8 %{ fn statpost { - f = $1 + f = $1 - post_uri = `{echo $f | sed 's,^'$sitedir',,'} - #title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' } + post_uri = `{echo $f | sed 's,^'$sitedir',,'} + #title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' } title=`{read $f/index.md} - 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=`{awk -v max'='1024 '{ - nc += 1 + length; - if(nc > max) { - print substr($0, 1, nc - max) "..." - exit - } - print - }' $f/index.md |fmt -j| sed 's/\]\]>/Fucking goddamn XML garbage/g'} - } + 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} } } %} - - - %($siteTitle%) - %($req_path%) - %($blogDesc%) - en-us - Tom Duff's rc, and Kris Maglione's clever hackery + + + %($siteTitle%) + %($base_url^$req_path%) + %($blogDesc%) + en-us + Tom Duff's rc, and Kris Maglione's clever hackery %{ - # uriel99+rss@gmail.com (Uriel) + # uriel99+rss@gmail.com (Uriel) for(f in `{get_post_list $blagh_root$blagh_dirs}) { - 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=''^$"mdate'' - #echo $last_build_date - #} + 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=''^$"mdate'' + #echo $last_build_date + #} %} - - %($title%) - %($by%)@noreply.cat-v.org (%($by%)) - %($uri%) - %($uri%) - %($date%) - %($summary%)]]> - -% } + + %($title%) + %($by%)@noreply.cat-v.org (%($by%)) + %($post_uri%) + %($post_uri%) + %($date%) + %($summary%) + +% } - +