| 10 | |
| 11 | == Another Version: Automatic linking to Milestones == |
| 12 | |
| 13 | I have attached another version [attachment:WikiCalendar.py] which has these new features: |
| 14 | * allows to specify the year,month to display |
| 15 | * allows to enable/disable the prev/next buttons |
| 16 | * still allows to define a wiki page |
| 17 | * but will display a link to a milestone in bold if there is one placed on that day |
| 18 | * default format for wiki page is "%Y-%m-%d" |
| 19 | * table header with weekdays will be in bold |
| 20 | |
| 21 | Description: |
| 22 | {{{ |
| 23 | Format: |
| 24 | WikiCalendar([year,month,[showbuttons,[wiki_page_format]]]) |
| 25 | |
| 26 | Description: |
| 27 | Displays a calendar, the days will link to: |
| 28 | - milestones (day in bold) if there is one on that day |
| 29 | - a wiki page that has wiki_page_format (if exist) |
| 30 | - create that wiki page if it does not exist |
| 31 | |
| 32 | Arguments: |
| 33 | year, month = display calendar for month in year ('*' for current year/month) |
| 34 | showbuttons = true/false, show prev/next buttons |
| 35 | wiki_page_format = strftime format for wiki pages to display as link |
| 36 | (if there is not a milestone placed on that day) |
| 37 | (if exist, otherwise link to create page) |
| 38 | default is "%Y-%m-%d" |
| 39 | |
| 40 | Examples: |
| 41 | WikiCalendar |
| 42 | shows a calendar for the current month, wiki pages will have the format "%Y-%m-%d" |
| 43 | |
| 44 | WikiCalendar(2006,07) |
| 45 | shows a calender for July 2006, wiki pages will have the format "%Y-%m-%d" |
| 46 | |
| 47 | WikiCalendar(2006,07,false) |
| 48 | as above, but don't display the prev/next buttons |
| 49 | |
| 50 | WikiCalendar(*,*,true,Meeting-%Y-%m-%d) |
| 51 | shows a calendar for the current month, with buttons, and wiki pages with the format "Meeting-%Y-%m-%d" |
| 52 | |
| 53 | WikiCalendar(2006,07,false,Meeting-%Y-%m-%d) |
| 54 | shows a calendar for July 2006, no buttons, and wiki pages with the format "Meeting-%Y-%m-%d" |
| 55 | }}} |
| 56 | |
| 57 | Credits: [mailto:alexander.klimetschek@hpi.uni-potsdam.de Alexander Klimetschek] |