swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit eb6a3d2f70d43dc4a29d88e20c3773def35f2a84
parent f4ffef44e58b4ff47381f0f89de8b65306e7e14d
Author: uriel@suckless.org <unknown>
Date:   Sat, 12 Jul 2008 07:58:04 +0200

Rss compliance fix, put lastBuildDate where it belongs, even if the value is just aproximated
Diffstat:
Mpub/feeds/rss20.tpl | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/pub/feeds/rss20.tpl b/pub/feeds/rss20.tpl @@ -13,15 +13,21 @@ Content-Type: text/xml; charset=utf-8 %{ for(f in `{sortedBlogPostList $blogDirs}) { statpost $f -%} <item> + # Hack to aproximate the last build date (use the mdate from last posted item) + if(~ $#last_build_date 0) { + last_build_date='<lastBuildDate>'^$"mdate'</lastBuildDate>' + echo $last_build_date + } +%} + <item> <title>%($title%)</title> <author>%($by%)@noreply.cat-v.org (%($by%))</author> <link>%($uri%)</link> <guid isPermaLink="true">%($uri%)</guid> <pubDate>%($date%)</pubDate> - <lastBuildDate>%($mdate%)</lastBuildDate> <description><![CDATA[<pre>%($summary%)</pre>]]></description> </item> % } + </channel> </rss>