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