wiki:WikiCalendarMacro

Version 50 (modified by Steffen Hoffmann, 11 years ago) (diff)

update to current state of development, pulling i18n-related information over from WikiTicketCalendarMacro's wiki page

Small calendar with days linking to wiki pages

Notice: This plugin is unmaintained and available for adoption.

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.

Description

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.

Bugs/Feature Requests

Existing bugs and feature requests for WikiCalendarMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:wikicalendarmacro here].

Source

You can check out the source for WikiCalendarMacro from Subversion here or browse the source with Trac.

Installation

Requires Trac >= 0.11.3. After [11741] you should be able to use the plugin even with Trac 0.11.

If you experience strange results (see #8818 for an example), you may want to force CSS definitions into the HTML page with the following option:

[wikicalendar]
internal_css = True
ticket.due_field = due_close
ticket.due_field.format = %y-%m-%d

available since [11746], WikiTicketCalendarMacro options supported since [11749]

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.

Example

Usage:

[[WikiCalendar([year, [month, [show-buttons, [wiki-page-format]]]])]]

Arguments:

  1. year (4-digit year) - defaults to * (current year)
  2. month (2-digit month) - defaults to * (current month)
  3. show-buttons (boolean) - defaults to true
  4. 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:

[[WikiCalendar(*,*,true,../Meeting/%Y-%m-%d)]]

Screenshot of version 5

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

  1. look, if it's already available from the Trac plugin l10n project at Transifex or
  2. do it yourself (see the l10n cookbook page for Trac plugins for more details).

You've done a new translation? Superb! Contributing your translation is highly appreciated.
You could send it to the plugin's maintainer or contribute to Trac plugin l10n project via Transifex:

Top translations: Trac_Plugin-L10N » wikicalendar-messages

http://www.transifex.net/projects/p/Trac_Plugin-L10N/resource/wikicalendar-messages/chart/image_png

Kindly provided by https://ds0k0en9abmn1.cloudfront.net/static/charts/images/tx-logo-micro.png

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.

Recent Changes

17886 by rjollos on 2020-12-02 22:28:02
2.2.0dev: Make compatible with Trac 1.0 and 1.0.1
17857 by rjollos on 2020-08-25 20:15:06
2.2.0dev: Remove print statement from r17850

Refs #13847.

17851 by rjollos on 2020-08-20 18:12:13
2.2.0dev: Change plugin name

This prepares for publishing on PyPI.

Refs #13847.

(more)

Author/Contributors

Author: mgood
Maintainer: hasienda
Contributors: Alexander Klimetschek, rjollos, JoshuaH, YouLi, fjruiz

Attachments (2)

Download all attachments as: .zip