#import time, rfc822 #from urlparse import urljoin #from xml.sax.saxutils import escape #from template import authorFor, xmlchars, bodyOrEncoded, rfc822_local Content-type: application/rss+xml #if $parent $channel.title: $escape($parent.title) $urljoin($channel.link,$parent.link) $xmlchars($parent.description) #else $channel.title $channel.link $xmlchars($channel.description) #end if $channel.generator $channel.author $channel.author $rfc822_local() $channel.language Copyright $time.strftime("%Y") $channel.title #for $item in $Items #set $author=authorFor($item.content) $item.title $urljoin($channel.link,$item.link) $urljoin($channel.link,$item.guid) #if $item.description <> $item.content $escape($item.description) #else $escape($item.content) #end if $rfc822_local($item.mtime) $item.comments $urljoin($channel.link,$item.entry+'.tb') $urljoin($channel.link,$item.entry+'.atomapi') #if not $parent $urljoin($channel.link,$item.entry+'.rss2') #end if #if $author $author #end if #end for