1.1 --- a/EventAggregatorSupport.py Sun Apr 05 00:08:07 2009 +0200
1.2 +++ b/EventAggregatorSupport.py Sun May 17 17:33:11 2009 +0200
1.3 @@ -16,7 +16,7 @@
1.4 import time
1.5 import re
1.6
1.7 -__version__ = "0.2"
1.8 +__version__ = "0.3"
1.9
1.10 # Date labels.
1.11
1.12 @@ -181,7 +181,7 @@
1.13
1.14 # Labels which may well be quoted.
1.15
1.16 - elif term in ("title", "summary"):
1.17 + elif term in ("title", "summary", "description"):
1.18 desc = getSimpleWikiText(desc)
1.19
1.20 if desc is not None:
2.1 --- a/README.txt Sun Apr 05 00:08:07 2009 +0200
2.2 +++ b/README.txt Sun May 17 17:33:11 2009 +0200
2.3 @@ -139,6 +139,13 @@
2.4 Copyright and licence information can be found in the docs directory - see
2.5 docs/COPYING.txt and docs/LICENCE.txt for more information.
2.6
2.7 +New in EventAggregator 0.3 (Changes since EventAggregator 0.2)
2.8 +--------------------------------------------------------------
2.9 +
2.10 + * Added a parameter to the EventAggregatorSummary action to select the
2.11 + source of event descriptions for the RSS feed.
2.12 + * Updated the documentation to cover the RSS support.
2.13 +
2.14 New in EventAggregator 0.2 (Changes since EventAggregator 0.1)
2.15 --------------------------------------------------------------
2.16
3.1 --- a/actions/EventAggregatorSummary.py Sun Apr 05 00:08:07 2009 +0200
3.2 +++ b/actions/EventAggregatorSummary.py Sun May 17 17:33:11 2009 +0200
3.3 @@ -45,7 +45,15 @@
3.4 month_label = _(EventAggregatorSupport.getMonthLabel(month))
3.5 month_list.append('<option value="%02d">%s</option>' % (month, month_label))
3.6
3.7 - year_label = []
3.8 + descriptions_list = [
3.9 + '<option value="%s">%s</option>' % ("page", _("page")),
3.10 + '<option value="%s">%s</option>' % ("comment", _("comment"))
3.11 + ]
3.12 +
3.13 + format_list = [
3.14 + '<option value="%s">%s</option>' % ("iCalendar", _("iCalendar")),
3.15 + '<option value="%s">%s</option>' % ("RSS", _("RSS 2.0"))
3.16 + ]
3.17
3.18 d = {
3.19 "buttons_html" : buttons_html,
3.20 @@ -56,6 +64,10 @@
3.21 "start_year_default" : "",
3.22 "end_label" : _("End year and month"),
3.23 "end_year_default" : "",
3.24 + "descriptions_label" : _("Use descriptions from..."),
3.25 + "descriptions_list" : "\n".join(descriptions_list),
3.26 + "format_label" : _("Summary format"),
3.27 + "format_list" : "\n".join(format_list),
3.28 }
3.29
3.30 return '''
3.31 @@ -87,6 +99,22 @@
3.32 </td>
3.33 </tr>
3.34 <tr>
3.35 + <td class="label"><label>%(descriptions_label)s</label></td>
3.36 + <td class="content">
3.37 + <select name="descriptions">
3.38 + %(descriptions_list)s
3.39 + </select>
3.40 + </td>
3.41 + </tr>
3.42 + <tr>
3.43 + <td class="label"><label>%(format_label)s</label></td>
3.44 + <td class="content">
3.45 + <select name="format">
3.46 + %(format_list)s
3.47 + </select>
3.48 + </td>
3.49 + </tr>
3.50 + <tr>
3.51 <td></td>
3.52 <td class="buttons">
3.53 %(buttons_html)s
3.54 @@ -140,6 +168,7 @@
3.55
3.56 category_names = request.form.get("category", [])
3.57 format = request.form.get("format", ["iCalendar"])[0]
3.58 + descriptions = request.form.get("descriptions", ["page"])[0]
3.59
3.60 # Otherwise, produce an iCalendar resource.
3.61
3.62 @@ -239,7 +268,16 @@
3.63 request.write('<item>\r\n')
3.64 request.write('<title>%s</title>\r\n' % wikiutil.escape(event_summary))
3.65 request.write('<link>%s</link>\r\n' % link)
3.66 - request.write('<description>%s</description>\r\n' % wikiutil.escape(event_details["last-comment"]))
3.67 +
3.68 + # Write a description according to the preferred source of
3.69 + # descriptions.
3.70 +
3.71 + if descriptions == "page":
3.72 + description = event_details.get("description", "")
3.73 + else:
3.74 + description = event_details["last-comment"]
3.75 +
3.76 + request.write('<description>%s</description>\r\n' % wikiutil.escape(description))
3.77
3.78 for topic in event_details.get("topics") or event_details.get("categories") or []:
3.79 request.write('<category>%s</category>\r\n' % topic)
4.1 --- a/setup.py Sun Apr 05 00:08:07 2009 +0200
4.2 +++ b/setup.py Sun May 17 17:33:11 2009 +0200
4.3 @@ -8,6 +8,6 @@
4.4 author = "Paul Boddie",
4.5 author_email = "paul@boddie.org.uk",
4.6 url = "http://moinmo.in/MacroMarket/EventAggregator",
4.7 - version = "0.2",
4.8 + version = "0.3",
4.9 py_modules = ["EventAggregatorSupport"]
4.10 )