1 Introduction
2 ------------
3
4 The EventAggregator macro for MoinMoin can be used to display event calendars
5 or listings which obtain their data from pages belonging to specific
6 categories (such as CategoryEvents) or from remote event sources. The start
7 and end dates are read from the page describing each event, and the calendar
8 is automatically filled out with the details of each event, colouring each
9 event period in a specially generated colour. Maps showing event locations are
10 also supported, given the availability of appropriate map images and location
11 information.
12
13 The EventAggregatorSummary action can be used to provide iCalendar and RSS
14 summaries of event data based on pages belonging to specific categories, as
15 described above. The category, start and end parameters are read directly from
16 the request as URL or form parameters: these restrict the extent of each
17 generated summary.
18
19 The EventAggregatorNewEvent action can be used to conveniently create new
20 event pages, displaying a simple form which can be filled out in order to
21 provide elementary event details such as the event title or summary, the
22 categories to which the page will be assigned, and the start and end dates of
23 the event.
24
25 The eventfeed script can be used to import events from RSS feeds, inserting
26 new pages into a Wiki.
27
28 Important Notices
29 -----------------
30
31 In release 0.10, the EventAggregatorSupport module has been converted into a
32 package. Upon upgrading, it may be necessary to locate the source and compiled
33 module files (EventAggregatorSupport.py and EventAggregatorSupport.pyc) and
34 remove them. Otherwise, these files may disrupt the functioning of the newly-
35 installed software.
36
37 In release 0.9, much of the common support code has been moved to the
38 MoinSupport distribution, thus introducing that distribution as a dependency
39 which must be installed for EventAggregator to work. See the documentation
40 regarding dependencies for further details.
41
42 Release 0.8.4 fixes time zone offset calculations for time regimes west of the
43 prime meridian.
44
45 Release 0.8.3 fixes end dates in events aggregated from remote iCalendar
46 sources.
47
48 Release 0.7.1 restores MoinMoin 1.9.x compatibility which was accidentally
49 lost in the 0.7 release.
50
51 Release 0.6.2 fixes various bugs in HTML production done by the actions. It is
52 strongly recommended to upgrade from earlier versions to this or a later
53 release.
54
55 In release 0.6.2, support for MoinMoin 1.5.x has been dropped. Since usage of
56 the Xapian search software is practically a necessary part of deploying this
57 solution, and yet Xapian only became integrated with MoinMoin from version 1.6
58 onwards, few deployments should have involved MoinMoin 1.5.x.
59
60 In release 0.6, support for event times has been introduced. Due to the
61 complicated nature of times, time zones, time regimes, and so on, the
62 behaviour of the software may change in future versions to support common
63 use-cases in a more convenient fashion. Please be aware that implicitly chosen
64 or generated time or time zone information may change for events, particularly
65 those whose times are ambiguous or ill-defined. It is highly recommended that
66 the pytz library be installed - see the documentation regarding dependencies
67 for more information.
68
69 In release 0.5, the "download this calendar" and "subscribe to this calendar"
70 links have been fixed to return only events within the specified period and to
71 work with day- and month-relative calendars. Users who have bookmarks in their
72 Web browser or feed reader should replace these bookmarks by visiting the
73 bookmarked page and acquiring new versions of these links, once
74 EventAggregator has been upgraded.
75
76 Installation
77 ------------
78
79 To install the support library and MoinMoin-related scripts, consider using
80 the moinsetup tool. See the "Recommended Software" section below for more
81 information.
82
83 With moinsetup and a suitable configuration file, the installation is done as
84 follows with $EADIR referring to the EventAggregator distribution directory
85 containing this README.txt file:
86
87 python moinsetup.py -f moinsetup.cfg -m install_extension_package $EADIR
88 python moinsetup.py -f moinsetup.cfg -m install_actions $EADIR/actions
89 python moinsetup.py -f moinsetup.cfg -m install_macros $EADIR/macros
90 python moinsetup.py -f moinsetup.cfg -m install_parsers $EADIR/parsers
91 python moinsetup.py -f moinsetup.cfg -m install_theme_resources $EADIR
92 python moinsetup.py -f moinsetup.cfg -m edit_theme_stylesheet screen.css event-aggregator.css
93 python moinsetup.py -f moinsetup.cfg -m edit_theme_stylesheet print.css event-aggregator.css
94 python moinsetup.py -f moinsetup.cfg -m edit_theme_stylesheet print.css event-aggregator-print.css
95
96 The first command above uses the setup.py script provided as follows:
97
98 python setup.py install --prefix=path-to-moin-prefix
99
100 The second, third and fourth commands install the actions, macros and parsers
101 respectively.
102
103 The fifth command installs the theme resources in the available theme
104 directories.
105
106 The remaining commands activate the styles provided by EventAggregator by
107 editing the screen.css and print.css files which are typically provided by
108 themes. These commands add imports of the following form to the theme
109 stylesheets:
110
111 @import "event-aggregator.css";
112
113 Additional Installation Tasks
114 -----------------------------
115
116 See the "Dependencies" section below for details of the software featured in
117 this section.
118
119 EventAggregator depends on MoinSupport having been installed. This is because
120 a lot of useful functionality common to a number of MoinMoin extensions now
121 resides in the MoinSupport distribution.
122
123 The following command can be run with $MSDIR referring to the MoinSupport
124 distribution directory:
125
126 python moinsetup.py -f moinsetup.cfg -m install_extension_package $MSDIR
127
128 To support iCalendar summary production for calendars as well as the
129 capability of aggregating iCalendar format event sources, the vContent
130 software needs to be obtained and installed.
131
132 The following command can be run with $VCDIR referring to the vContent
133 distribution directory:
134
135 python moinsetup.py -f moinsetup.cfg -m install_extension_package $VCDIR
136
137 In each case, the install_extension_package method merely runs the setup.py
138 script provided by the software concerned, installing the software under the
139 configured installation "prefix".
140
141 Useful Pages
142 ------------
143
144 The pages directory contains a selection of useful pages using a syntax
145 appropriate for use with MoinMoin 1.6 or later. These pages can be created
146 through the Wiki and their contents copied in from each of the files. An
147 easier installation method is to issue the following commands:
148
149 python moinsetup.py -f moinsetup.cfg -m make_page_package $EADIR/pages pages.zip
150 python moinsetup.py -f moinsetup.cfg -m install_page_package pages.zip
151
152 You may need to switch user in order to have sufficient privileges to copy the
153 page package into the Wiki. For example:
154
155 sudo -u www-data python moinsetup.py -f moinsetup.cfg -m install_page_package pages.zip
156
157 Resource Pages
158 --------------
159
160 For the map view, some resource pages are provided with EventAggregator.
161 Unlike the help pages which are most likely to be left unedited, the resource
162 pages should be modified and updated with additional map and place details.
163 Consequently, upgrading these pages is not necessarily desirable when new
164 releases of EventAggregator are made available, and thus these pages are kept
165 separate from the help pages.
166
167 To install the resource pages, use the following commands:
168
169 python moinsetup.py -f moinsetup.cfg -m make_page_package $EADIR/resource_pages resource_pages.zip
170 python moinsetup.py -f moinsetup.cfg -m install_page_package resource_pages.zip
171
172 You may need to switch user in order to have sufficient privileges to copy the
173 page package into the Wiki. For example:
174
175 sudo -u www-data python moinsetup.py -f moinsetup.cfg -m install_page_package resource_pages.zip
176
177 Using the Macro
178 ---------------
179
180 It should now be possible to edit pages and use the macro as follows:
181
182 <<EventAggregator(CategoryEvents)>>
183
184 As arguments to the macro, you must indicate a comma-separated list of
185 categories to be inspected for event data. For example:
186
187 <<EventAggregator(CategoryEvents,CategoryTraining)>>
188
189 By default, this should display a calendar in a collection of tables, one for
190 each month containing events. To show a collection of month-by-month listings,
191 use the 'mode' argument as follows:
192
193 <<EventAggregator(CategoryEvents,mode=list)>>
194
195 To use remote event sources instead of categories in the Wiki, specify each
196 source using explicit source parameters:
197
198 <<EventAggregator(source=GriCal,source=FSFE)>>
199
200 This will aggregate events from the GriCal and FSFE calendars residing on
201 remote Web sites, provided that these sources have been defined in the event
202 sources dictionary.
203
204 To use a search pattern, use the search parameter and specify the search
205 criteria just as you would when using the standard search macros:
206
207 <<EventAggregator(search="title:MonthCalendarEvents/")>>
208
209 This will aggregate events found on subpages of the MonthCalendarEvents page.
210
211 See pages/HelpOnEventAggregator for more detailed information.
212
213 Using the Actions
214 -----------------
215
216 To obtain an iCalendar summary, the EventAggregatorSummary action can be
217 selected from the actions menu on any page. Alternatively, a collection of
218 parameters can be specified in the URL of any Wiki page.
219
220 See pages/HelpOnEventAggregatorSummary for more detailed information.
221
222 To create new events using the EventAggregatorNewEvent action, the appropriate
223 menu entry can be selected in the actions menu. Alternatively, clicking on a
224 day number in a calendar view will invoke the action and pre-fill the form
225 with the start date set to the selected day from the calendar.
226
227 See pages/HelpOnEventAggregatorNewEvent for more detailed information.
228
229 Running the Scripts
230 -------------------
231
232 Note that remote event sources are likely to be more useful than the scripts
233 described below. However, these scripts may be useful for certain kinds of
234 application.
235
236 To import events from an RSS feed, the eventfeed script integrated with the
237 moin program can be used as follows:
238
239 moin --config-dir=path-to-wiki --wiki-url=example.com/ \
240 import eventfeed --url=url-of-events-feed
241
242 Thus, to import events from the FSFE events RSS feed, the following command
243 could be used:
244
245 moin --config-dir=path-to-wiki --wiki-url=example.com/ \
246 import eventfeed --url=http://www.fsfe.org/events/events.en.rss
247
248 If this command is being used with sudo, make sure to use the -u option so
249 that the script can operate as the appropriate user. For example:
250
251 sudo -u www-data moin --config-dir=path-to-wiki --wiki-url=example.com/ \
252 import eventfeed --url=http://www.fsfe.org/events/events.en.rss
253
254 It may also be necessary to set PYTHONPATH directly before the moin program
255 name and even to explicitly use the path to that program.
256
257 Recommended Software
258 --------------------
259
260 See the "Dependencies" section below for essential software.
261
262 The moinsetup tool is recommended for installation since it aims to support
263 all versions of MoinMoin that are supported for use with this software.
264
265 See the following page for information on moinsetup:
266
267 http://moinmo.in/ScriptMarket/moinsetup
268
269 The Xapian search software is highly recommended, if not technically
270 essential, for the acceptable performance of the EventAggregator macro since
271 the macro makes use of search routines in MoinMoin that can dominate the time
272 spent processing requests.
273
274 See the following page for information on Xapian and MoinMoin:
275
276 http://moinmo.in/HelpOnXapian
277
278 Troubleshooting: Categories
279 ---------------------------
280
281 See here for a bug related to category recognition:
282
283 http://moinmo.in/MoinMoinBugs/1.7TemplatesNotAppearing
284
285 This affects installations where migrations between versions have occurred,
286 yet the Wiki configuration retains old regular expression details.
287
288 Troubleshooting: Xapian
289 -----------------------
290
291 Xapian can be troublesome, especially where file permissions are concerned: if
292 something acquires a lock on the index (for example, the moin script, possibly
293 invoked via moinsetup) nothing else will be able to modify the index, and this
294 may cause pages to become detached from their categories in the index.
295
296 To resolve index issues, try and run the following command (with the appropriate
297 options):
298
299 moin --config-dir=path-to-wiki --wiki-url=example.com/ index build --mode=rebuild
300
301 It may be necessary to manually remove locks. This can be done as follows:
302
303 find path-to-wiki/data/cache/xapian -depth -name "*lock" -type d -exec rmdir '{}' \;
304
305 Troubleshooting: Plain Text Formatting
306 --------------------------------------
307
308 Plain text formatting is used in certain places in EventAggregator, but the
309 formatter is rather broken in MoinMoin 1.8 and in previous releases. See the
310 following page for a summary:
311
312 http://moinmo.in/FeatureRequests/TextPlainFormatterRewrite
313
314 A patch is supplied in the patches directory to fix link formatting in the
315 plain text formatter, and once copied into the root directory of the MoinMoin
316 1.8 sources it can be applied as follows:
317
318 patch -p1 < patch-plain-text-link-formatting-1.8.diff
319
320 Contact, Copyright and Licence Information
321 ------------------------------------------
322
323 See the following Web pages for more information about this work:
324
325 http://moinmo.in/MacroMarket/EventAggregator
326 http://moinmo.in/ActionMarket/EventAggregator
327
328 The author can be contacted at the following e-mail address:
329
330 paul@boddie.org.uk
331
332 Copyright and licence information can be found in the docs directory - see
333 docs/COPYING.txt and docs/LICENCE.txt for more information.
334
335 Dependencies
336 ------------
337
338 EventAggregator has the following basic dependencies:
339
340 Packages Release Information
341 -------- -------------------
342
343 MoinSupport Tested with 0.3
344 Source: http://hgweb.boddie.org.uk/MoinSupport
345
346 vContent Tested with 0.2
347 Source: http://hgweb.boddie.org.uk/vContent
348
349 pytz Tested with 2007k (specifically 2007k-0ubuntu2)
350 Source: http://pytz.sourceforge.net/
351
352 If time zone handling is not required, pytz need not be installed, but this
353 may result in iCalendar summaries being produced that provide insufficient
354 time zone information for the correct interpretation of time information in
355 those summaries. Thus, it is highly recommended that pytz be installed.
356
357 New in EventAggregator 0.10 (Changes since EventAggregator 0.9)
358 ---------------------------------------------------------------
359
360 * Fixed quoting of special date parameters in navigation URLs and download
361 dialogue URLs.
362 * Fixed the resolution of whole calendar download/subscription links in day
363 views.
364 * Added support for showing events that occupy instants in time in day
365 views, consolidating times in the timescale used for each day and showing
366 the times specified for the events concerned for each common point in
367 time.
368 * Adjusted labels of navigation links to indicate multiple days where a day
369 view shows many days.
370 * Changed iCalendar serialisation to use the vContent library, making
371 vContent a requirement of this software.
372 * Refactored the library, replacing the support module with a package
373 containing separate modules for the different library activities.
374
375 New in EventAggregator 0.9 (Changes since EventAggregator 0.8.5)
376 ----------------------------------------------------------------
377
378 * Moved much of the support library to the MoinSupport distribution, thus
379 introducing a dependency on that software.
380 * Added support for in-page updates of the event views so that navigation
381 between days, months and different views does not cause a full-page
382 reload if JavaScript is enabled.
383 * Tidied up the new event form, showing a list of known locations for
384 selection, making the event location affect the chosen time zone/regime if
385 the location is known, and hiding latitude and longitude fields unless an
386 unknown location is to be specified.
387 * The EventLocationsDict or equivalent can now retain time zone/regime
388 information about each location.
389 * Added an event parser that can format special page regions in different
390 ways and support links directly to such regions.
391 * Permitted Wiki markup in the description and location metadata.
392 * Added support for search patterns so that event pages can be obtained
393 through arbitrary searches and do not have to belong to particular
394 categories.
395 * Encoded map location pop-up headings as plain text in order to handle
396 locations specified using Wiki formatting.
397 * Permitted events with map references but without location details to be
398 positioned in maps.
399 * Improved navigation between months and days, and between view modes for
400 both levels of calendar view.
401
402 New in EventAggregator 0.8.5 (Changes since EventAggregator 0.8.4)
403 ------------------------------------------------------------------
404
405 * Fixed iCalendar quoting for newlines in calendar data.
406
407 New in EventAggregator 0.8.4 (Changes since EventAggregator 0.8.3)
408 ------------------------------------------------------------------
409
410 * The calculation of hour and minute offsets for time regimes west of the
411 prime meridian was not producing correct results since the day offset
412 provided by pytz was not being considered in the calculation. Such regimes
413 should now produce the expected (hour, minute) offsets such that events
414 employing these regimes can be positioned correctly on a UTC timescale.
415
416 New in EventAggregator 0.8.3 (Changes since EventAggregator 0.8.2)
417 ------------------------------------------------------------------
418
419 * The end dates defined in events from remote iCalendar event sources were
420 not correctly adjusted when aggregating such events. Thus, events with a
421 day-level resolution will have appeared one day longer in calendars and
422 summaries than was actually specified in the source data. This adjustment
423 has now been introduced.
424
425 New in EventAggregator 0.8.2 (Changes since EventAggregator 0.8.1)
426 ------------------------------------------------------------------
427
428 * Improved the error handling around remote event source data retrieval,
429 introducing handling of missing resources and unsupported content types.
430 * Improved the presentation of download and subscription links, adding
431 webcal: URL links for suitable calendar clients.
432
433 New in EventAggregator 0.8.1 (Changes since EventAggregator 0.8)
434 ----------------------------------------------------------------
435
436 * Changed the EventAggregatorNewEvent action to not save new event pages
437 directly, instead invoking the textual page editor for the page so that
438 the page text can be changed and the page saved without a redundant
439 initial version being created. Cancelling the editing operation will also
440 avoid the creation of unwanted event pages.
441 * Added a page break before each map in the print view, adding a page break
442 after each map to fully isolate unpositioned events on separate pages.
443 * Fixed errors where empty location fields were given in vCalendar events.
444 * Reintroduced event sorting in the list and table views.
445 * Fixed location positioning where some events employing an unknown location
446 do not position that location whereas others do (using "geo" information).
447
448 New in EventAggregator 0.8 (Changes since EventAggregator 0.7.1)
449 ----------------------------------------------------------------
450
451 * Added remote event aggregation with support for iCalendar event sources.
452 * Added support for explicit latitude and longitude event properties.
453 * Added support for decimal latitude and longitude values.
454 * Introduced in-page updates of the new event form, avoiding full-page
455 reloads when editing the initial details of an event.
456
457 New in EventAggregator 0.7.1 (Changes since EventAggregator 0.7)
458 ----------------------------------------------------------------
459
460 * Restored MoinMoin 1.9.x compatibility around WikiDict access.
461
462 New in EventAggregator 0.7 (Changes since EventAggregator 0.6.4)
463 ----------------------------------------------------------------
464
465 * Added a day view which shows events ordered according to their timespans
466 within each day.
467 * Added a map view which shows events according to their location. This
468 requires map images to be uploaded to a designated page, and map locations
469 to be defined on a designated page.
470 * Switched to using moinsetup for the installation procedure.
471 * Introduced formatting of description, location and topic information in
472 the list and table views and in RSS format summaries.
473 * Introduced support for days as calendar period units in the list view.
474 * Added "Help" and "New event" links alongside the calendar view controls,
475 giving the download and view controls centre alignment.
476
477 New in EventAggregator 0.6.4 (Changes since EventAggregator 0.6.3)
478 ------------------------------------------------------------------
479
480 * Fixed pop-up element labels where one limit of a calendar has not been
481 specified.
482
483 New in EventAggregator 0.6.3 (Changes since EventAggregator 0.6.2)
484 ------------------------------------------------------------------
485
486 * Fixed category membership parsing.
487 * Fixed open-ended calendars and their pop-up summaries.
488
489 New in EventAggregator 0.6.2 (Changes since EventAggregator 0.6.1)
490 ------------------------------------------------------------------
491
492 * Fixed HTML encoding in the forms generated by the actions.
493 * Dropped MoinMoin 1.5.x support, since Xapian search is not available for
494 that version and is virtually a necessity.
495 * Fixed form handling to be compatible with MoinMoin 1.9.x, since that
496 particular release series introduced an incompatible request API that
497 breaks existing code (no longer providing access to query string
498 parameters via the form attribute, and only returning single values
499 unless the new getlist method on form-like objects is used).
500 * Fixed the direct writing of requests to be compatible with MoinMoin 1.9.
501 * Added pop-up elements showing information about the calendar/view
502 resources available for download or subscription.
503 * Added download/subscription links which open the form associated with the
504 EventAggregatorSummary action and permit editing of the supplied values.
505
506 New in EventAggregator 0.6.1 (Changes since EventAggregator 0.6)
507 ----------------------------------------------------------------
508
509 * Fixed HTML encoding in the forms generated by the actions.
510
511 New in EventAggregator 0.6 (Changes since EventAggregator 0.5)
512 --------------------------------------------------------------
513
514 * Added print stylesheet rules in order to improve the printed versions of
515 calendars.
516 * Fixed definition list parsing to handle completely empty definitions
517 (having no space after the "::" token) which previously captured text from
518 subsequent lines, and merely empty definitions which previously would have
519 produced a single empty value for definitions providing lists of values.
520 * Added a script to import events from RSS feeds.
521 * Added support for a link entry in event pages, although this does not
522 replace the link information provided by the RSS and iCalendar summaries.
523 * Fixed the production of the summaries when pages with no available edit
524 log information are to be included.
525 * Added support for event times and time zone/regime information. This is
526 subject to revision.
527
528 New in EventAggregator 0.5 (Changes since EventAggregator 0.4)
529 --------------------------------------------------------------
530
531 * Changed the EventAggregatorNewEvent action to substitute only the stated
532 title, not the full page title, into the new page.
533 * Changed event colouring to use the event summary as the basis for
534 calculating the colour used in the calendar. This means that related
535 events can be coloured identically if their summaries are the same.
536 * Added support for multiple events on a single event page.
537 * Introduced EventPage and Event abstractions in order to better support new
538 features.
539 * Introduced basic and advanced modes to the EventAggregatorNewEvent action,
540 along with date swapping to correct cases where the start is given as
541 being later than the end of an event.
542 * Fixed the "download this calendar" and "subscribe to this calendar" links
543 by propagating the "raw" calendar start and end values within the macro.
544 These links should yield events only within the period defined for a
545 calendar, not all events in a calendar's categories. This fix also ensures
546 that the links for year- and month-relative calendars are correct, rather
547 than the specific links generated previously. Thus, a "this year's events"
548 link will now continue to produce a resource with the current year's
549 events, rather than the events from the year when the link was generated.
550
551 New in EventAggregator 0.4 (Changes since EventAggregator 0.3)
552 --------------------------------------------------------------
553
554 * Added a table view in the macro, using special topic/category styles to
555 provide background colours for events.
556 * Added category propagation from calendars to the new event form provided
557 by the EventAggregatorNewEvent action.
558 * Added a default template parameter to the macro, employed by the new event
559 form.
560 * Added a parent page parameter which is used by the new event form to place
561 new event pages in a particular location specific to a calendar or
562 collection of events.
563 * Improved the presentation of pop-up event information elements.
564 * Added navigation between display modes (calendar, list and table views).
565 * Ensured that calendar settings are retained when creating new events for a
566 calendar.
567 * Fixed various problems with events not having topics.
568
569 New in EventAggregator 0.3 (Changes since EventAggregator 0.2)
570 --------------------------------------------------------------
571
572 * Added a parameter to the EventAggregatorSummary action to select the
573 source of event descriptions for the RSS feed.
574 * Updated the documentation to cover the RSS support.
575 * Added the EventAggregatorNewEvent action.
576
577 New in EventAggregator 0.2 (Changes since EventAggregator 0.1)
578 --------------------------------------------------------------
579
580 * Improved the calendar view in the macro to use the fixed table layout
581 algorithm and to provide cells spanning potentially many columns for
582 continuing events. Introduced pop-up elements in order to show truncated
583 event names.
584 * Made the "weekly" naming policy the default in the calendar view.
585 * Improved the list view in the macro.
586 * Introduced RSS 2.0 feed support.
587 * Improved the help pages.
588
589 Release Procedures
590 ------------------
591
592 Update the EventAggregatorSupport __version__ attribute and the setup.py
593 version details.
594 Change the version number and package filename/directory in the documentation.
595 Update the setup.py and PKG-INFO files.
596 Update the release notes (see above).
597 Tag, export.
598 Archive, upload.
599 Update the MacroMarket and ActionMarket (see above for the URLs).