4 def __init__(self, planet):
9 def __write_item__(self, item):
12 output += ' <title>%s: %s</title>\n' % (item.blogTitle, item.itemTitle)
13 output += ' <guid>%s</guid>\n' % item.itemURL
14 output += ' <link>%s</link>\n' % item.itemURL
15 output += ' <description>\n'
16 output += item.contents
17 output += '\n </description>\n'
18 output += '<pubDate>%s</pubDate>\n' % time.strftime('%a, %d %b %Y %H:%M:%S +0000', time.gmtime(item.itemDate))
25 output += '<rss version="2.0">\n'
26 output += ' <channel>\n'
27 output += ' <title>Planet UCC</title>\n'
28 output += ' <link>http://planet.ucc.asn.au/</link>\n'
29 output += ' <language>en</language>\n'
30 output += ' <description>Planet UCC</description>\n'
31 for date in self.planet:
32 for item in date.items:
33 output += self.__write_item__(item)
35 if itemcount >= self.maxitems:
37 if itemcount >= self.maxitems:
39 output += ' </channel>\n'