1.1 --- a/EventAggregatorSupport.py Mon Jun 08 23:41:01 2009 +0200
1.2 +++ b/EventAggregatorSupport.py Fri Oct 02 22:42:37 2009 +0200
1.3 @@ -16,7 +16,7 @@
1.4 import time
1.5 import re
1.6
1.7 -__version__ = "0.3"
1.8 +__version__ = "0.4"
1.9
1.10 # Date labels.
1.11
2.1 --- a/PKG-INFO Mon Jun 08 23:41:01 2009 +0200
2.2 +++ b/PKG-INFO Fri Oct 02 22:42:37 2009 +0200
2.3 @@ -1,12 +1,12 @@
2.4 Metadata-Version: 1.1
2.5 Name: EventAggregator
2.6 -Version: 0.3
2.7 +Version: 0.4
2.8 Author: Paul Boddie
2.9 Author-email: paul at boddie org uk
2.10 Maintainer: Paul Boddie
2.11 Maintainer-email: paul at boddie org uk
2.12 Home-page: http://moinmo.in/MacroMarket/EventAggregator
2.13 -Download-url: http://moinmo.in/MacroMarket/EventAggregator?action=AttachFile&do=view&target=EventAggregator-0.3.tar.gz
2.14 +Download-url: http://moinmo.in/MacroMarket/EventAggregator?action=AttachFile&do=view&target=EventAggregator-0.4.tar.gz
2.15 Summary: Aggregate event data and display it in an event calendar (or summarise it in iCalendar and RSS resources)
2.16 License: GPL (version 2 or later)
2.17 Description: The EventAggregator macro for MoinMoin can be used to display event
3.1 --- a/README.txt Mon Jun 08 23:41:01 2009 +0200
3.2 +++ b/README.txt Fri Oct 02 22:42:37 2009 +0200
3.3 @@ -152,6 +152,12 @@
3.4 Copyright and licence information can be found in the docs directory - see
3.5 docs/COPYING.txt and docs/LICENCE.txt for more information.
3.6
3.7 +New in EventAggregator 0.4 (Changes since EventAggregator 0.3)
3.8 +--------------------------------------------------------------
3.9 +
3.10 + * Added a table view in the macro, using special topic/category styles to
3.11 + provide background colours for events.
3.12 +
3.13 New in EventAggregator 0.3 (Changes since EventAggregator 0.2)
3.14 --------------------------------------------------------------
3.15
3.16 @@ -178,7 +184,7 @@
3.17 Update the EventAggregatorSupport.py __version__ attribute and the setup.py
3.18 version details.
3.19 Change the version number and package filename/directory in the documentation.
3.20 -Update the setup.py file.
3.21 +Update the setup.py and PKG-INFO files.
3.22 Update the release notes (see above).
3.23 Tag, export.
3.24 Archive, upload.
4.1 --- a/css/event-aggregator.css Mon Jun 08 23:41:01 2009 +0200
4.2 +++ b/css/event-aggregator.css Fri Oct 02 22:42:37 2009 +0200
4.3 @@ -223,5 +223,23 @@
4.4 padding-bottom: 2em;
4.5 }
4.6
4.7 +/* Table view */
4.8 +
4.9 +.event-table-heading {
4.10 + font-weight: bold;
4.11 +}
4.12 +
4.13 +.event-table-category-conference {
4.14 + background-color: #ff9999;
4.15 +}
4.16 +
4.17 +.event-table-category-training {
4.18 + background-color: #99ff99;
4.19 +}
4.20 +
4.21 +.event-table-category-special {
4.22 + background-color: #ffff99;
4.23 +}
4.24 +
4.25 /* vim: tabstop=4 expandtab shiftwidth=4
4.26 */
5.1 --- a/macros/EventAggregator.py Mon Jun 08 23:41:01 2009 +0200
5.2 +++ b/macros/EventAggregator.py Fri Oct 02 22:42:37 2009 +0200
5.3 @@ -277,9 +277,31 @@
5.4
5.5 # Output top-level information.
5.6
5.7 + # Start of list view output.
5.8 +
5.9 if mode == "list":
5.10 output.append(fmt.bullet_list(on=1, attr={"class" : "event-listings"}))
5.11
5.12 + # Start of table view output.
5.13 +
5.14 + elif mode == "table":
5.15 +
5.16 + # Output a table.
5.17 +
5.18 + output.append(fmt.table(on=1, attrs={"tableclass" : "event-table"}))
5.19 +
5.20 + output.append(fmt.table_row(on=1))
5.21 + output.append(fmt.table_cell(on=1, attrs={"class" : "event-table-heading"}))
5.22 + output.append(fmt.text(_("Event dates")))
5.23 + output.append(fmt.table_cell(on=0))
5.24 + output.append(fmt.table_cell(on=1, attrs={"class" : "event-table-heading"}))
5.25 + output.append(fmt.text(_("Event location")))
5.26 + output.append(fmt.table_cell(on=0))
5.27 + output.append(fmt.table_cell(on=1, attrs={"class" : "event-table-heading"}))
5.28 + output.append(fmt.text(_("Event details")))
5.29 + output.append(fmt.table_cell(on=0))
5.30 + output.append(fmt.table_row(on=0))
5.31 +
5.32 # Visit all months in the requested range, or across known events.
5.33
5.34 for year, month in EventAggregatorSupport.daterange(first, last):
5.35 @@ -692,6 +714,62 @@
5.36
5.37 output.append(fmt.bullet_list(on=0))
5.38
5.39 + # Or output a table of events...
5.40 +
5.41 + elif mode == "table":
5.42 +
5.43 + # Get the events in order.
5.44 +
5.45 + ordered_events = EventAggregatorSupport.getOrderedEvents(shown_events.get((year, month), []))
5.46 +
5.47 + # Show the events in order.
5.48 +
5.49 + for event_page, event_details in ordered_events:
5.50 + event_summary = EventAggregatorSupport.getEventSummary(event_page, event_details)
5.51 +
5.52 + # Prepare CSS classes with category-related styling.
5.53 +
5.54 + css_classes = ["event-table-details"]
5.55 +
5.56 + for topic in event_details.get("topics") or event_details.get("categories"):
5.57 +
5.58 + # Filter the category text to avoid illegal characters.
5.59 +
5.60 + css_classes.append("event-table-category-%s" % "".join(filter(lambda c: c.isalnum(), topic)))
5.61 +
5.62 + attrs = {"class" : " ".join(css_classes)}
5.63 +
5.64 + output.append(fmt.table_row(on=1))
5.65 +
5.66 + # Start and end dates.
5.67 +
5.68 + output.append(fmt.table_cell(on=1, attrs=attrs))
5.69 + output.append(fmt.span(on=1))
5.70 + output.append(fmt.text("%04d-%02d-%02d" % event_details["start"]))
5.71 + output.append(fmt.span(on=0))
5.72 + output.append(fmt.text(" - "))
5.73 + output.append(fmt.span(on=1))
5.74 + output.append(fmt.text("%04d-%02d-%02d" % event_details["end"]))
5.75 + output.append(fmt.span(on=0))
5.76 + output.append(fmt.table_cell(on=0))
5.77 +
5.78 + # Location.
5.79 +
5.80 + output.append(fmt.table_cell(on=1, attrs=attrs))
5.81 +
5.82 + if event_details.has_key("location"):
5.83 + output.append(fmt.text(event_details["location"]))
5.84 +
5.85 + output.append(fmt.table_cell(on=0))
5.86 +
5.87 + # Link to the page using the summary.
5.88 +
5.89 + output.append(fmt.table_cell(on=1, attrs=attrs))
5.90 + output.append(linkToPage(request, event_page, event_summary))
5.91 + output.append(fmt.table_cell(on=0))
5.92 +
5.93 + output.append(fmt.table_row(on=0))
5.94 +
5.95 # Output top-level information.
5.96
5.97 # End of list view output.
5.98 @@ -699,6 +777,11 @@
5.99 if mode == "list":
5.100 output.append(fmt.bullet_list(on=0))
5.101
5.102 + # End of table view output.
5.103 +
5.104 + elif mode == "table":
5.105 + output.append(fmt.table(on=0))
5.106 +
5.107 return ''.join(output)
5.108
5.109 # vim: tabstop=4 expandtab shiftwidth=4
6.1 --- a/pages/CategoryEvents Mon Jun 08 23:41:01 2009 +0200
6.2 +++ b/pages/CategoryEvents Fri Oct 02 22:42:37 2009 +0200
6.3 @@ -9,6 +9,10 @@
6.4
6.5 <<NewPage(EventTemplate,Add an event)>>
6.6
6.7 +Each event must be created on a new page belonging to the appropriate event category. The following action can be used to create a new event page (using !EventAggregatorNewEvent):
6.8 +
6.9 +(!) <<Action(EventAggregatorNewEvent,Add an event)>>
6.10 +
6.11 Some ideas:
6.12
6.13 * You can add other categories and then separate groups of events by assigning their pages to different categories.
7.1 --- a/pages/HelpOnEventAggregator Mon Jun 08 23:41:01 2009 +0200
7.2 +++ b/pages/HelpOnEventAggregator Fri Oct 02 22:42:37 2009 +0200
7.3 @@ -44,7 +44,7 @@
7.4 Title:: the preferred name of the event in the calendar
7.5 Summary:: a synonym for title
7.6 Topics:: a list of topics related to the event - use a comma (`,`) to separate topic names
7.7 - Categories:: a synonym for topics
7.8 + Categories:: a synonym for topics - note that this means "event categories", not "page categories" which are a distinct concept
7.9 Location:: the location of the event
7.10
7.11 These properties may be incorporated into representations or summaries of events.
7.12 @@ -116,7 +116,7 @@
7.13
7.14 Without any time period, the calendar would show all events, and there would be no real need to provide navigation, since there would be no events outside the displayed period to navigate to. It is possible to omit either the `start` or the `end` parameter and still provide navigation, however.
7.15
7.16 -== Showing Event Lists ==
7.17 +== Showing Event Lists and Tables ==
7.18
7.19 A more plain view of events can be displayed by specifying the `mode` parameter as follows:
7.20
7.21 @@ -124,7 +124,25 @@
7.22 <<EventAggregator(CategoryEvents,mode=list)>>
7.23 }}}
7.24
7.25 -The `list` value causes a list view to be employed; the `calendar` value causes the default calendar view to be employed.
7.26 +The `list` value causes a list view to be employed.
7.27 +
7.28 +Another alternative view can be chosen by specifying the `mode` parameter with a value of `table` as in the following example:
7.29 +
7.30 +{{{
7.31 +<<EventAggregator(CategoryEvents,mode=table)>>
7.32 +}}}
7.33 +
7.34 +This collects all appropriate events into a single table, applying colouring to the cells belonging to a particular event based on that event's topic (or category) information. By default, only the following topics (or categories) cause cell colouring:
7.35 +
7.36 + * `conference` - using the `event-table-category-conference` style
7.37 + * `special` - using the `event-table-category-special` style
7.38 + * `training` - using the `event-table-category-training` style
7.39 +
7.40 +To define your own topic colours, edit the `event-aggregator.css` file which is provided with the !EventAggregator distribution, and then reinstall that file for each of the Wiki themes of interest. Topics involved in event colouring should be mutually exclusive: more than one such topic should not be specified for any given event.
7.41 +
7.42 +=== Note ===
7.43 +
7.44 +The `calendar` value causes the default calendar view to be employed.
7.45
7.46 == See Also ==
7.47
8.1 --- a/setup.py Mon Jun 08 23:41:01 2009 +0200
8.2 +++ b/setup.py Fri Oct 02 22:42:37 2009 +0200
8.3 @@ -8,6 +8,6 @@
8.4 author = "Paul Boddie",
8.5 author_email = "paul@boddie.org.uk",
8.6 url = "http://moinmo.in/MacroMarket/EventAggregator",
8.7 - version = "0.3",
8.8 + version = "0.4",
8.9 py_modules = ["EventAggregatorSupport"]
8.10 )