4 # A plugin to XMLWriter to output RSS version 1.0.
5 # This plugin has been developed with no regard for the RSS1.0 spec.
13 def __init__(self, planet):
18 def __write_item__(self, item):
20 output += '<item rdfAbout="%s">\n' % item.itemURL
21 output += ' <title>%s: %s</title>\n' % (item.blogTitle, item.itemTitle)
22 output += ' <link>%s</link>\n' % item.itemURL
23 output += ' <content:encoded>\n'
24 output += item.contents
25 output += '\n </content:encoded>\n'
26 output += ' <dc:date>%s</dc:date>\n' % time.strftime('%Y-%m-%dT%H:%M:%S+00:00', time.gmtime(item.itemDate))
33 output += '<rdf:RDF>\n'
34 output += ' <channel>\n'
35 output += ' <title>Planet UCC</title>\n'
36 output += ' <link>http://planet.ucc.asn.au/</link>\n'
37 # XXX: we need to output the blogroll here
38 output += ' </channel>\n'
39 for date in self.planet:
40 for item in date.items:
41 output += self.__write_item__(item)
43 if itemcount >= self.maxitems:
45 if itemcount >= self.maxitems:
47 output += '</rdf:RDF>\n'