|Version 52 (modified by hasienda, 12 months ago) (diff)|
Small calendar with days linking to wiki pages
The "sister" macro WikiTicketCalendarMacro, once forked off from this macro, has been re-integrated. Both macros are available in wikicalendar-2.0.0 and later.
Inserts a small calendar where each day links to a wiki page whose name matches the wiki-page-format argument. The current day is highlighted, and days with Milestones are marked in bold. This macro makes heavy use of CSS for formatting.
It can be used for maintaining a calendar of meeting minutes or 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 uses the time format syntax from the Python time module's strftime method. Resolution of relative wiki paths is available.
Check the documentation for WikiTicketCalendarMacro to learn about it's option to preselect a wiki page template for new pages and much more.
New: Since wikicalendar-2.1 both macros are able to display week numbers. Just add a 'w' to your macro arguments (argument position doesn't matter). With Babel installed you even get Sunday as first day of the week and week numbers localized according to you browser settings.
If you have any issues, create a new ticket.
Download the zipped source from here.
Requires Trac >= 0.11.3. After  you should be able to use the plugin even with Trac 0.11.
[wikicalendar] internal_css = True ticket.due_field = due_close ticket.due_field.format = %y-%m-%d
Easy upgrade: Rename your old [wikiticketcalendar] section, and the required option name change ticket.due_field.name --> ticket.due_field.name will be done automatically for you.
[[WikiCalendar([year, [month, [show-buttons, [wiki-page-format]]]])]]
- year (4-digit year) - defaults to * (current year)
- month (2-digit month) - defaults to * (current month)
- show-buttons (boolean) - defaults to true
- wiki-page-format (string) - defaults to %Y-%m-%d
[[WikiCalendar(2006,07)]] [[WikiCalendar(2006,07,false)]] [[WikiCalendar(*,*,true,Meeting-%Y-%m-%d)]] [[WikiCalendar(2006,07,false,Meeting-%Y-%m-%d)]]
Note: relative wiki paths are supported as well, what might be especially relevant, if you later change position of the wiki page containing the WikiCalendarMacro relative to the stack of related wiki pages:
Screenshots using [[WikiCalendar(w)]] (for week numbers) with different browser locale settings
About i18n/l10n support
These macros are prepared for localization (tooltip customization in calendar navigation and localized macro description).
But English message texts are still the (POSIX) default. If this isn't your preferred language, you can
- look, if it's already available from the Trac plugin l10n project at Transifex or
- do it yourself (see the l10n cookbook page for Trac plugins for more details).
Top translations: Trac_Plugin-L10N » wikicalendar-messages
Preparing the plugin from source requires no additional steps for compiling message catalog files. Only to include translations marked as # fuzzy by the translator, you'll want to do a manual message catalog compilation with the extra -f argument before packaging:
cd wikicalendarmacro/ python ./setup.py compile_catalog -f python ./setup.py bdist_egg
Complaints about missing locale directory are often a side-effect of failure to compile any message catalog for inclusion into Python egg, hence the whole path is missing. Due to a known Trac issue, Babel has to be installed prior to Trac, to get it all working as expected.
Again, for more details see the l10n cookbook page for Trac plugins.
-  by hasienda on 2014-03-31 21:33:53
WikiCalendarMacro: Improve 'today' offset calculation to succeed for any day-of-month, refs #11656.
-  by hasienda on 2014-02-11 23:30:45
WikiCalendarMacro: Pre-filter tickets by calendar time range for performance.
-  by hasienda on 2013-04-21 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.
(8.3 KB) -
added by Andy 6 years ago.
Screenshot of version 5
(30.9 KB) -
added by hasienda 12 months ago.
WikiCalendarMacro v2.1 with week numbers for different preferred locales: English (default), French, Spanish, German, Hungarian, Russian, Hebrew and Japanese
Download all attachments as: .zip