Questions answered by this recipe
How can I export events of an specific date from an existing wikicalendar?
Import/Export ical-files from/to a wikicalendar.
The script adds two action ("?action=fromics" and "?action=toics") to the wiki, which permit to import events from a given ical-file to a wikicalender or export events from a wikicalendar to a ics-file.
The recipe expects each calendar entry to be seperated by a horizontal rule and to use keywords ("Von:", "Bis:", "Wo:", "Beschreibung") for the single parts of the event.
!!!title of the first event Von: hh:mm
To export events from your calender the scripts adds the action "?action=toics" to your wiki, which will create a file and store it in the Uploaddirectory of the calendargroup.
To import events from an ical-file (.ics, RFC2445) use the action "?action=fromics", which will add all events from a previously uploaded file (with the name "events.ics") to your wikicalendar-pages. To import a specific file, use the "?action=fromics&file=filename" (without extension) to get all events from a ical-file named "filename.ics".
The whole recipe is mainly in German and the keywords are hardcoded at the moment, what will change in a following version.
Problem: The Dates and Times for Von: and Bis: where exchanged, so that the start date became the end date and vice versa.
Problem: If you want to export all events from the calendar Group, the script scans the whole wiki by using the function ListPages() without parameters. After exporting, it does not return to the calendar group but to the last page of the last group in the whole wiki.
151: # alle Seiten der Kalendergruppe des wikis in ein array schreiben 152: $pagelist = ListPages("/".$ICalCalendarGroup."/");
In effect, only the pages of the calendar Group are scanned for events. This is necessary, since only these events are exported by the script anyway.