This is a record of pre v0.98 Bugs and Disussion for EventCalendar, moved from the original page to make that somewhat clearer.
Contents
Bugs
v0.98
- Bug: When you leave trailing spaces on an event you get errors eg
== Invalid event #1 == start:: 2006-04-28 end:: 2006-05-01 13:00 description:: start time should be specified
- start::2006-04-28[trailing space]
/var/lib/mywiki/data/plugin/macro/EventCalendar.py in getEventRecordFromPage (pagecontent=u'== Valid event #1 ==\n start:: 2006-04-28\n end:: ... HH:MM (e.g., 09:00)\n\n----\nCategoryEventCalendar\n', referpage=u'WikiSandBox/EventTest') 1681 1682 try: 1683 e_start_date, e_start_time, e_end_date, e_end_time, e_bgcolor, e_label, e_description, e_recur_freq, e_recur_type, e_recur_until = geteventfield(eventdetail) 1684 except EventcalError, errmsgcode: 1685 e_start_date = u'20060503' e_start_time = u'1300' e_end_date = u'20060508' e_end_time = u'1700' e_bgcolor = '' e_label = '' e_description = u'Test. Putting a longer description on this. end ...3:00. Will see how it turns out on the preview. 4' e_recur_freq = 0 e_recur_type = '' e_recur_until = '' global geteventfield = <function geteventfield> eventdetail = u'\n start:: 2006-04-28 \n end:: 2006-05-01 13:00\n description:: start time should be specified\n' /var/lib/mywiki/data/plugin/macro/EventCalendar.py in geteventfield (detail=u'\n start:: 2006-04-28 \n end:: 2006-05-01 13:00\n description:: start time should be specified\n') 2054 starthour += 12 2055 2056 starttime = '%02d:%02d' % (int(starthour), int(startmin)) 2057 2058 else: starttime undefined builtin int = <type 'int'> starthour undefined startmin undefined
SkenderH
Thanks for your bug report. I've fixed it in v0.99. Please try it. -- SeungikLee 2006-05-22 14:33:37
V0.99 does not seem to be attached. Please attach and I'll give it a try --SkenderHaxhimolla
Oops. Sorry I forgot. -- SeungikLee 2006-05-23 09:52:54
Works for me now, thanks for the quick fix -- SkenderHaxhimolla
v0.94
- Error at sorting events for list/upcoming view within Python 2.3.x
patch: eventcalendar-094-01.patch
- Improper handling the reference page's URL (if it's subpage or of spaced name)
- fixed in v0.95
Broken for non-zero minute start times. When I try and enter 19:30 for a start time, it ignores the entire entry. (Python 2.4) --IanEpperson
fixed as part of easytime patch --IanEpperson
Easytime patch: Allows start time with no end time, and entry (but not display - yet) of time in various formats: --IanEpperson
- 12:34
- 1:34
- 1:34am
- 1:34pm (becomes 13:34)
- 12:34am (becomes 00:34)
- 1234 (becomes 12:34)
- 1am
- 3pm
- 123 (unfortunately becomes 12:03 - but what do you expect from that?)
Thanks for valuable patches. I'll try to add this patch into the next version. -- SeungikLee 2006-02-28 01:29:44
Discussion
v0.98
Commented data
I really love the event calendar and I think it's one of the best macros (if not the best) for Moin. What I would like to be able to do is comment the part where actual event calendar data is shown, something like:
= Event1 = ## start:: 2006-06-10 ## end:: 2006-06-11 ## description:: some description description which will be shown on the page...
It works if I take the comments off. Could parser be fixed somehow to include commented lines? Or is there any other way to acomplish this?
- Modify the regular expressions for each field. For example, (not tested)
-- SeungikLee 2006-05-30 20:47:53
http://www.plsavez.hr/hps/Kalendar - Works great. I like it this way much more. Thanks a lot! -- JureKodzoman 2006-06-01 16:45:52
v0.94 ~ v0.96
Background Color for days with events in simple view
I can see that in your example page, the simpleview of the calendar has distictive colors for days with events (palid blue) and days without them (white). How can I get this behaviour?
Cheers and thanks for the good work -- Offray
See eventcal.css to change the background colors of TD.simple_event for a day with events, TD.simple_event_today for today with events. -- SeungikLee 2006-05-02 01:41:28
What to do with eventcal.css
Hi all, I have a newbie question and a request to describe this thing better in the installation guide: Where must I add the eventcal.css? Is there a way to import the *.css or must I copy whole eventcal.css in the right common.css? I wish for some more information in the installation guide at this place. Thx, for help. -- Stephan, 24.04.2006
First, please refer to the help contents about moinmoin theme. Assuming that you're using moinmoin modern theme, you can find out the screen.css from the moinmoin/share/theme/modern/css directory. Open screen.css and insert the whole content of eventcal.css at the end of the screen.css. If you use or provide some other theme, you should do it again at the corresponding theme directory. Good luck. -- SeungikLee 2006-04-24 14:03:26
very nice, but one page for one day is much easier to handle and more secure. -- GSB 2006-01-30 17:42:28
It's up to you. Just insert the events for one day into one page with the specified category. -- SeungikLee 2006-01-31 13:50:53
hi, great addition to MoinMoin, but with the latest versions for 1.5 i've a problem: events from one page are displayed correctly, but only some events from another page are listed -- RiBeZ 2006-02-23 22:38:23
I've found that if you put a time with any minute other than :00 it gets ignored. Thus, and time of 9:00 is OK, but 9:30 will not show. -- IanEpperson 2006-02-25 08:02:03
Hi Ian. Unfortunely it's not my case. Here an example of a not displayed event from the page CompleanniAnniversari (to track birthdays and anniversaries):
== compleanno Teresa == start:: 2006/08/24 recur:: 1 year
but from the same page, this event is correctly listed:== compleanno Andrea == start:: 2006/09/25 recur:: 1 year
Instead, from another page (ToDo), all events are correctly listed, for example:
== comprare libro storia Il sole-24ore == start:: 2006/03/09 description:: Guerra e pace (I)
As you can see, i don't use any form of time, but only dates. So probably there are other bugs -- RiBeZ 2006-02-27 20:10:53
I've tested with these events but it works well. Please try to delete cache of the page. BTW, non-zero minute event works well in my calendar. (python 2.4.1/moin1.5/winxp) It might be a platform-dependent problem. Note that the time format should be HH:DD. Thus 09:30 works but 9:30 does not. As mentioned at usage, the both of start time and end time should be specified (or neither). Such an event that has only either one of start time or end time will be ignored. -- SeungikLee 2006-02-28 01:29:44
Hi, if the list of events gets longer (e.g. after one year...), the "List"-view will be very long, because it shows all events regardless if they are already expired or not.
My idea would be something like "previous 100 events"+"next 100 events", or other ways to make the list shorter.
Thanks a lot for the good work! -- ChristianNass 2006-03-01
Another thing that I thought about: I would prefer some kind of coloring schemes for the events. Instead of (or as an alternative option) giving an event a specified color code, events should get a "color label", like "important" or "holiday" or the like. And on a additional page, also referenced by the category, these color codes will be resolved.
Or more general, there could be global definitions like
ColorCode(importang):: #ff0000
so it is not important if this appears on an extra page or in the page itself.
Thank you, Christian -- ChristianNass 2006-03-01
discussions for older versions than v0.94
- Its hard to edit tab separated file, maybe use some other separator, or use some markup.
- At inserting the data, it replaces tab to other characters. I've tried to use xml for this but its file size grows much.
Of course XML suck for data entry. But you may use wiki markup, for example:
== Event Name == Event description... start:: 2005-10-25 14:00 end:: 2005-10-28 20:00 foo:: bar
This markup is automatically rendered in a meaningful way:
Event Name
Event description...
- start
- 2005-10-25 14:00
- end
- 2005-10-28 20:00
- foo
- bar
You can parse this data using a special event formatter, that ignore everything but heading level 1, paragraph, text and definition list. When you format you page with such formatter, it can produce a list of events objects, each with name, start, end, foo and description. Check how MoinMoin/formatter/pagelinks.py works. I think this will be the easiest way to parse your data into format you can use. Then pickle your event data in the page cache directory. Next time you need to read the page data, use the cache. Check how Page use this system to create a pagelinks cache - Page.getPageLinks, Page.parsePageLinks.
It's a good suggestion, I think. But I'm trying to avoid to use dedicated wiki pages for event data only, because it generates orphan pages. My target is: we just create and maintain normal wiki pages, and insert a marker for an event record when we need event calendar for neat scheduling. I use the parsing block with eventcal as the marker. For example, http://angel.icu.ac.kr/~silee/CalendarTest2 shows how the MoinMoin 1.5 release schedules in http://moinmoin.wikiwikiweb.de/MoinMoinTodo/Release_1.5 can use this method.
-- SeungikLee 2005-10-29 18:26:31
- What is wrong with orphaned pages?
not wrong but it is fully dependent to the calendar so that the wiki pages for storing event data need to be removed when the calendar for these is not needed any more. My suggestion is that the event information is our normal wikis and you could insert a marker per event record - without or with small changes in its text - when you've got to aggretate all the related events in user-friendly format, e.g., monthly view of the events.
- If you can put events in any page, how do you collect events in the event viewer? Lets say you have a good solution to collect events from all the wiki - how do you find the event source when you want to remove or edit events?
- Not all the wiki but child pages of some page where macro inserted or specified. Of course that it may be very tough job to search the events from all the pages if we specify the root page as the target. In the event calendar, each event entry has the reference page which the event information is collected from. To make it easier to find the event entry in the reference page, a bookmark to this could be generated automatically.
- Could you give me a hint for that? I'll take it into my consideration.
-- SeungikLee 2005-10-27 03:47:38
Seems that you don't need that hint any more
Use page content, not a file.
I've inserted the functionalities you mentioned. It uses wiki page content as well as text data files, and a parser shows the event item in the page content. Please visit the sample site (http://angel.icu.ac.kr/~silee/CalendarTest). It's very buggy but give your comment please. Thanks. -- SeungikLee 2005-10-28 16:26:48
Why use both data file and a wiki page?
Frankly speaking, using text data file was the first version of event calendar. With your suggestions, I've added features to use wiki pages. I didn't want to remove the text file features from it and kept groaning to find any reasons to leave it. And I was struck by an idea and I can answer: The data file is used - remains - for administrative events, e.g., holidays. For example, you add several holidays into the text file, and just copy the text files to other calendars of yours or make it public to be used by others. Hurray!
I tried your event test page. It is not clear how you should work with it. I learned by trial and error that each #!eventcal is an event, and I guess you use the date~date as start and end date.
I suggest you write a specification that describe what kind of activities you want to support, and how people should do common tasks. For example, how one should add an event, change event data like start date, end date etc. It is hard to test the implementation when you don't know what the system should do
Oops. Sorry for inconvenience. Please refer to http://angel.icu.ac.kr/~silee/CalendarTest/EventTest. Thanks.
Looks fine and useful, some wishes
- it seems to me that each entry needs a seperate parser call I would prefer one parser call, an entry goes from one level heading to the end or to the next heading. If you don't separate calls you don't get different indicators at the moment.
- What do you think if insert a separating special character like '#nextevent'? For example,
{ { {#!eventcal ''first event'' 2005/10/20 #nextevent == second event == 2005/10/25 ~ 2005/10/27 #nextevent On 2005/11/02, we have a "3rd event". } } }
- or any other better way?
- What do you think if insert a separating special character like '#nextevent'? For example,
I would like preferable to have a New Event button which is used to write the entries for the parser. Hmm I don't like to have on default it writing an additional file. I read your points on this but a wiki page is much more secure (revision history). Probably a Calendar page list could be used which is searched and called. Similiar to the Group pages for acl. Later on with PackageInstaller it would be easy to move it from wiki to wiki too.
- OK. I got it and better to remove the use of text file. BTW, what's better?: New Event goes to a wiki page editor or customized input form (as in current) to insert the content into wiki page by macro?
Preferable is a form which writes the user input to a page. Advanced wiki user could choose what they use (is the same with the GUI here)
- OK. I got it and better to remove the use of text file. BTW, what's better?: New Event goes to a wiki page editor or customized input form (as in current) to insert the content into wiki page by macro?
- Can I have different colors for the events please. A next color thing would be fine or on demand.
- What I can get now is inserting a parameter like '#eventcolor' for bgcolor, icons as mentioned above. For example,
{ { {#!eventcal #bgcolor #ccffff ''first event'' 2005/10/20 #nextevent #bgcolor #cccccc #eventicon (!) == second event == 2005/10/25 ~ 2005/10/27 #nextevent #bgcolor #cccccc #eventicon {*} On 2005/11/02, we have a "3rd event". } } }
- What I can get now is inserting a parameter like '#eventcolor' for bgcolor, icons as mentioned above. For example,
I thought more on using the existing wiki markup for example. The nummeration is done automaticly.
{ { { = first event = Event description... start:: 2005-10-25 14:00 end:: 2005-10-28 20:00 foo:: bar color:: <#FF0000> bgcolor:: <#CCCCCC> = second event = Event description... start:: 2005-10-30 14:00 end:: 2005-11-08 20:00 foo:: bar = third event = Event description... start:: 2005-11-25 14:00 end:: 2005-11-25 14:00 foo:: bar ---- CategorySystemCalendar } } }
While this page is set to the category CategorySystemCalendar it's entries are shown in the SystemCalendar. Similiar to include pages a user could add on an own page private entries secured by acls for only reading from him. Then if he looks at the calendar own entries are shown too but if one else looks his entries are invisible.
If it would be possible to have dependencies the second and following heading levels could be used -- ReimarBauer 2005-11-05 08:44:26
It's an easy format to use IMHO. I'll take it into consideration to the next update. -- SeungikLee 2005-11-29 01:47:58
- I think it will replace my Gantt parser by adding some more list views.
- Please give me a hint for that.
-- ReimarBauer 2005-11-01 17:06:10
- the layout of the calendar will be corrupted while switching the theme other than default.
What if I prefer using RestructuredText to display my Information? Did I get this right, that everything inside { { {#!eventcal ... } } } is parsed by eventcal and then given to the wiki-Parser? Can I tell eventcal to use ReST? (Nesting parsers doesnt seems to work -- which makes sense to me) -- HenningHasemann 2005-11-29 11:08:10
I'm afraid that the macro won't work with RST though the eventcal parser may work because the macro reads to parse the raw body of the pages. Sorry for inconvenience. -- SeungikLee 2005-11-29 13:22:49
Okay, I think I can live without RST for the few lines / words that define dates, so that isn't too bad, but another thing I would consider useful is some kind of patterns. For example having things happening every Monday or so. Maybe the good old "calendar" program for UNIX/linux would also be a nice example for a syntax where one could easily describe repeating events. From the man page: (\t is the <TAB>-Character, calendar uses this to split dates and information) {{{ Thursday\tEvery Thursday.
- June\tEvery June 1st. 15 *\t15th of every month. May Sun+2\tsecond Sunday in May (Muttertag) 04/SunLast\tlast Sunday in April, \tsummer time in Europe Easter\tEaster Ostern-2\tGood Friday (2 days before Easter) Paskha\tOrthodox Easter
}}} -- HenningHasemann
I think it is a good idea to have a event calendar with multiple references. User can maintain their own schedules individually, while showing group schedule in a common event calendar. How do you think ? --MoinBenz
Great ideas. I'll take these into the consideration on the next version. I hope you could help me then. Thanks. -- SeungikLee 2005-12-16 06:46:36
The macro is updated to v0.91. The target of this update is to make it simple to use esp. in event data format reflecting some comments here. Please look through it at http://www.silee.net/CalendarTest and post your valuable comments or suggestions. Thanks. -- SeungikLee 2006-01-13 06:37:01