comparison MoinMoin/macro/MonthCalendar.py @ 2725:388204baf00f

change [[macro]] to <<macro>> in all built-in markup
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 12 Aug 2007 23:42:33 +0200
parents 6de0e14591f7
children 5913913a4dc0
comparison
equal deleted inserted replaced
2724:3ce812c19af7 2725:388204baf00f
89 * added template argument for specifying an edit template for new pages 89 * added template argument for specifying an edit template for new pages
90 * 2.3: 90 * 2.3:
91 * adapted to moin 1.7 new macro parameter parsing 91 * adapted to moin 1.7 new macro parameter parsing
92 92
93 Usage: 93 Usage:
94 [[MonthCalendar(BasePage,year,month,monthoffset,monthoffset2,height6)]] 94 <<MonthCalendar(BasePage,year,month,monthoffset,monthoffset2,height6)>>
95 95
96 each parameter can be empty and then defaults to currentpage or currentdate or monthoffset=0 96 each parameter can be empty and then defaults to currentpage or currentdate or monthoffset=0
97 97
98 Samples (paste that to one of your pages for a first try): 98 Samples (paste that to one of your pages for a first try):
99 99
100 Calendar of current month for current page: 100 Calendar of current month for current page:
101 [[MonthCalendar]] 101 <<MonthCalendar>>
102 102
103 Calendar of last month: 103 Calendar of last month:
104 [[MonthCalendar(,,,-1)]] 104 <<MonthCalendar(,,,-1)>>
105 105
106 Calendar of next month: 106 Calendar of next month:
107 [[MonthCalendar(,,,+1)]] 107 <<MonthCalendar(,,,+1)>>
108 108
109 Calendar of Page SampleUser, this years december: 109 Calendar of Page SampleUser, this years december:
110 [[MonthCalendar(SampleUser,,12)]] 110 <<MonthCalendar(SampleUser,,12)>>
111 111
112 Calendar of current Page, this years december: 112 Calendar of current Page, this years december:
113 [[MonthCalendar(,,12)]] 113 <<MonthCalendar(,,12)>>
114 114
115 Calendar of December, 2001: 115 Calendar of December, 2001:
116 [[MonthCalendar(,2001,12)]] 116 <<MonthCalendar(,2001,12)>>
117 117
118 Calendar of the month two months after December, 2001 118 Calendar of the month two months after December, 2001
119 (maybe doesn't make much sense, but is possible) 119 (maybe doesn't make much sense, but is possible)
120 [[MonthCalendar(,2001,12,+2)]] 120 <<MonthCalendar(,2001,12,+2)>>
121 121
122 Calendar of year 2002 (every month padded to height of 6): 122 Calendar of year 2002 (every month padded to height of 6):
123 ||||||Year 2002|| 123 ||||||Year 2002||
124 ||[[MonthCalendar(,2002,1,,,1)]]||[[MonthCalendar(,2002,2,,,1)]]||[[MonthCalendar(,2002,3,,,1)]]|| 124 ||<<MonthCalendar(,2002,1,,,1)>>||<<MonthCalendar(,2002,2,,,1)>>||<<MonthCalendar(,2002,3,,,1)>>||
125 ||[[MonthCalendar(,2002,4,,,1)]]||[[MonthCalendar(,2002,5,,,1)]]||[[MonthCalendar(,2002,6,,,1)]]|| 125 ||<<MonthCalendar(,2002,4,,,1)>>||<<MonthCalendar(,2002,5,,,1)>>||<<MonthCalendar(,2002,6,,,1)>>||
126 ||[[MonthCalendar(,2002,7,,,1)]]||[[MonthCalendar(,2002,8,,,1)]]||[[MonthCalendar(,2002,9,,,1)]]|| 126 ||<<MonthCalendar(,2002,7,,,1)>>||<<MonthCalendar(,2002,8,,,1)>>||<<MonthCalendar(,2002,9,,,1)>>||
127 ||[[MonthCalendar(,2002,10,,,1)]]||[[MonthCalendar(,2002,11,,,1)]]||[[MonthCalendar(,2002,12,,,1)]]|| 127 ||<<MonthCalendar(,2002,10,,,1)>>||<<MonthCalendar(,2002,11,,,1)>>||<<MonthCalendar(,2002,12,,,1)>>||
128 128
129 Current calendar of me, also showing entries of A and B: 129 Current calendar of me, also showing entries of A and B:
130 [[MonthCalendar(MyPage*TestUserA*TestUserB)]] 130 <<MonthCalendar(MyPage*TestUserA*TestUserB)>>
131 131
132 SubPage calendars: 132 SubPage calendars:
133 [[MonthCalendar(MyName/CalPrivate)]] 133 <<MonthCalendar(MyName/CalPrivate)>>
134 [[MonthCalendar(MyName/CalBusiness)]] 134 <<MonthCalendar(MyName/CalBusiness)>>
135 [[MonthCalendar(MyName/CalBusiness*MyName/CalPrivate)]] 135 <<MonthCalendar(MyName/CalBusiness*MyName/CalPrivate)>>
136 136
137 137
138 Anniversary Calendars: (no year data) 138 Anniversary Calendars: (no year data)
139 [[MonthCalendar(Yearly,,,+1,,6,1)]] 139 <<MonthCalendar(Yearly,,,+1,,6,1)>>
140 140
141 This creates calendars of the format Yearly/MM-DD 141 This creates calendars of the format Yearly/MM-DD
142 By leaving out the year, you can set birthdays, and anniversaries in this 142 By leaving out the year, you can set birthdays, and anniversaries in this
143 calendar and not have to re-enter each year. 143 calendar and not have to re-enter each year.
144 144
145 This creates a calendar which uses MonthCalendarTemplate for directly editing 145 This creates a calendar which uses MonthCalendarTemplate for directly editing
146 nonexisting day pages: 146 nonexisting day pages:
147 [[MonthCalendar(,,,,,,MonthCalendarTemplate)]] 147 <<MonthCalendar(,,,,,,MonthCalendarTemplate)>>
148 """ 148 """
149 149
150 Dependencies = ['namespace', 'time', ] 150 Dependencies = ['namespace', 'time', ]
151 151
152 import re, calendar, time 152 import re, calendar, time