# HG changeset patch # User Paul Boddie # Date 1257629296 -3600 # Node ID 7d7a4577ceb1ad2be689999802b2729f0b0eece9 # Parent 7f2571ba55e3a6ca76cc6dea456bd3b1aa88ff1c Incorporated changes to the RSS feed which enhance the title, link and description of each feed to refer to the page which provided it, as well as a change in the ordering of events in a feed, placing the latest events (in terms of the event start date) first. diff -r 7f2571ba55e3 -r 7d7a4577ceb1 actions/EventAggregatorSummary.py --- a/actions/EventAggregatorSummary.py Sat Nov 07 21:42:13 2009 +0100 +++ b/actions/EventAggregatorSummary.py Sat Nov 07 22:28:16 2009 +0100 @@ -7,6 +7,7 @@ 2003-2008 MoinMoin:ThomasWaldmann, 2004-2006 MoinMoin:AlexanderSchremmer, 2007 MoinMoin:ReimarBauer. + 2009 Cristian Rigamonti @license: GNU GPL (v2 or later), see COPYING.txt for details. """ @@ -251,12 +252,27 @@ request.write("END:VCALENDAR\r\n") elif format == "RSS": + + # Using the page name and the page URL in the title, link and + # description. + request.write('\r\n') request.write('\r\n') - request.write('Events\r\n') - request.write('%s\r\n' % request.getBaseURL()) - request.write('Events published on %s\r\n' % request.getBaseURL()) + request.write('%s\r\n' % request.getPathinfo()[1:]) + request.write('%s%s\r\n' % (request.getBaseURL(), request.getPathinfo())) + request.write('Events published on %s%s\r\n' % (request.getBaseURL(), request.getPathinfo())) request.write('%s\r\n' % EventAggregatorSupport.getHTTPTimeString(latest_timestamp)) + + # Sort all_shown_events by start date, reversed: + # + # * events are tuples: (real_page_in_category, event_details) + # * event_details are dictionaries, with the "start" entry providing + # the start date + # + # So we use as sorting key the "start" key from the event details (the + # second element of the tuple). + + all_shown_events.sort(key=lambda x: x[1]["start"], reverse=True) for event_page, event_details in all_shown_events: diff -r 7f2571ba55e3 -r 7d7a4577ceb1 docs/COPYING.txt --- a/docs/COPYING.txt Sat Nov 07 21:42:13 2009 +0100 +++ b/docs/COPYING.txt Sat Nov 07 22:28:16 2009 +0100 @@ -3,6 +3,10 @@ Copyright (C) 2008, 2009 Paul Boddie +Some patches provided by the following contributors: + +Copyright (C) 2009 Cristian Rigamonti + Some pieces of MoinMoin code were used in this work - typically pieces which demonstrate how to perform certain common tasks (as found in various macros and actions) - and are thus covered