| Version 27 (modified by rjollos, 3 years ago) |
|---|
WikiCalendar Macro
Description
Renders a calendar of links to date-based wiki pages. Its primary use is for maintaining a calendar of meeting minutes, but it can be used in any situation where the wiki page name is based on the date. It is designed to work well with the Blog macro, so if a previous month is selected from the Blog, the calendar will display the selected month.
Non-existent pages link directly to the edit form for the requested page to make it easy to add new meeting minutes pages.
It takes one argument to specify the format of the page names. It uses the time format syntax from the Python time module's strftime method.
Another Version: Automatic linking to Milestones
I have created another version http://myhpi.de/~alexklim/WikiCalendar.py (newer than the attached file, includes a time parse bug fix!) which has these new features: (I cannot attach any file to this page anymore, so the link is external. If someone with more privileges could attach that file again under the name WikiCalendar?.py it would be very nice)
- allows to specify the year,month to display
- allows to enable/disable the prev/next buttons
- still allows to define a wiki page
- but will display a link to a milestone in bold if there is one placed on that day
- default format for wiki page is "%Y-%m-%d"
- table header with weekdays will be in bold
Description:
Format:
WikiCalendar([year,month,[showbuttons,[wiki_page_format]]])
Description:
Displays a calendar, the days will link to:
- milestones (day in bold) if there is one on that day
- a wiki page that has wiki_page_format (if exist)
- create that wiki page if it does not exist
Arguments:
year, month = display calendar for month in year ('*' for current year/month)
showbuttons = true/false, show prev/next buttons
wiki_page_format = strftime format for wiki pages to display as link
(if there is not a milestone placed on that day)
(if exist, otherwise link to create page)
default is "%Y-%m-%d"
Examples:
WikiCalendar
shows a calendar for the current month, wiki pages will have the format "%Y-%m-%d"
WikiCalendar(2006,07)
shows a calender for July 2006, wiki pages will have the format "%Y-%m-%d"
WikiCalendar(2006,07,false)
as above, but don't display the prev/next buttons
WikiCalendar(*,*,true,Meeting-%Y-%m-%d)
shows a calendar for the current month, with buttons, and wiki pages with the format "Meeting-%Y-%m-%d"
WikiCalendar(2006,07,false,Meeting-%Y-%m-%d)
shows a calendar for July 2006, no buttons, and wiki pages with the format "Meeting-%Y-%m-%d"
Bugs/Feature Requests
Existing bugs and feature requests for WikiCalendarMacro are here.
If you have any issues, create a new ticket.
Download
Source
You can check out the source for WikiCalendarMacro from Subversion here or browse the source with Trac.
Example
[[WikiCalendar(Meeting-%Y-%m-%d)]]
will render as
Version 5 renders as
Recent Changes
[12991] by hasienda on 04/21/13 00:13:04
WikiCalendarMacro: Releasing current, tested macro package as final product, closes #7639, #8175, #9718, #10991, #10992 and #10993.
Special thanks to Jun Omae for pushing development by testing and providing valuable hints in our discussion about utilizing Babel for better localization and for making macro execution thread-safe as well.
[12990] by hasienda on 04/20/13 23:54:50
WikiCalendarMacro: Fix a NameError introduced by [12989] and remove excessive DEBUG logging.
[12989] by hasienda on 04/20/13 23:42:48
WikiCalendarMacro: Add optional week numbers, refs #1145, #7639 and #8175.
Rationale and constraints of current implementation:
- support any calendar per instance (use 'w' key-word) - no dependencies
- use basic start-of-week negotiation, if Babel is not installed
- use auto-negotiation for locale-aware Trac versions (since Trac 0.12)
- use advanced locale detection (similar to Trac 1.0.2)
Because I've found an issue with week number calculation in Babel, this plugin does it on its own for now.
[12988] by hasienda on 04/20/13 23:34:23
WikiCalendarMacro: Extensive code clean-up.
Determining first and last calendar day more accurately, and a simpler algorithm for detecting start and end of rows/weeks has been found too. Many more small changes have been done, often following pylint messages.
Author/Contributors
Author: mgood
Maintainer: rjollos
Contributors: Alexander Klimetschek, JoshuaH
Attachments
- wiki-calendar-screen.2.png (8.3 kB) -
Screenshot of version 5
, added by Andy on 07/15/08 20:31:39. - 20130421_wikicalendar_screenshot.gif (30.9 kB) -
WikiCalendarMacro v2.1 with week numbers for different preferred locales: English (default), French, Spanish, German, Hungarian, Russian, Hebrew and Japanese
, added by hasienda on 04/21/13 01:10:05.


