1.1 --- a/actions/EventAggregatorSummary.py Sat Nov 07 21:42:13 2009 +0100
1.2 +++ b/actions/EventAggregatorSummary.py Sat Nov 07 22:28:16 2009 +0100
1.3 @@ -7,6 +7,7 @@
1.4 2003-2008 MoinMoin:ThomasWaldmann,
1.5 2004-2006 MoinMoin:AlexanderSchremmer,
1.6 2007 MoinMoin:ReimarBauer.
1.7 + 2009 Cristian Rigamonti <rigamonti@fsfeurope.org>
1.8 @license: GNU GPL (v2 or later), see COPYING.txt for details.
1.9 """
1.10
1.11 @@ -251,12 +252,27 @@
1.12 request.write("END:VCALENDAR\r\n")
1.13
1.14 elif format == "RSS":
1.15 +
1.16 + # Using the page name and the page URL in the title, link and
1.17 + # description.
1.18 +
1.19 request.write('<rss version="2.0">\r\n')
1.20 request.write('<channel>\r\n')
1.21 - request.write('<title>Events</title>\r\n')
1.22 - request.write('<link>%s</link>\r\n' % request.getBaseURL())
1.23 - request.write('<description>Events published on %s</description>\r\n' % request.getBaseURL())
1.24 + request.write('<title>%s</title>\r\n' % request.getPathinfo()[1:])
1.25 + request.write('<link>%s%s</link>\r\n' % (request.getBaseURL(), request.getPathinfo()))
1.26 + request.write('<description>Events published on %s%s</description>\r\n' % (request.getBaseURL(), request.getPathinfo()))
1.27 request.write('<lastBuildDate>%s</lastBuildDate>\r\n' % EventAggregatorSupport.getHTTPTimeString(latest_timestamp))
1.28 +
1.29 + # Sort all_shown_events by start date, reversed:
1.30 + #
1.31 + # * events are tuples: (real_page_in_category, event_details)
1.32 + # * event_details are dictionaries, with the "start" entry providing
1.33 + # the start date
1.34 + #
1.35 + # So we use as sorting key the "start" key from the event details (the
1.36 + # second element of the tuple).
1.37 +
1.38 + all_shown_events.sort(key=lambda x: x[1]["start"], reverse=True)
1.39
1.40 for event_page, event_details in all_shown_events:
1.41