Den 23. jun. 2006 kl. 14.18 skrev Ross Gardler:

Does anyone of the committers have the time to apply this patch?

Done.

Thanks!

I'm using the corrected XML output from the Wiki plugin to extract iCal TODO items

This sounds like a really good use case. Any chance of a sample or a plugin for this?

I thought about it, but I was a little reluctant. Not because of any licensing issues, but because it presupposes a certain document structure. I'll outline the required document structure, and then you can comment upon whether it is useful or not.

The document we are creating is a (collaborative) meeting memo, where all tasks are collected and added to the end of the document. Presently we are collecting the tasks manually from each issue discussed during the meeting, but I'm trying to enforce a certain style that would allow me to extract and collect all tasks with a perl script.

The basic jspwiki structure is:

----------- start jspwiki document --------------
!!!Meeting

!!!Main issue X

text about the issue

!!Subissue

text about the subissue

... all other issues ...

!!!Task Summary

!!Person N

* task 1
* task 2
** subitems/additional info
* task 3

!!Person M

* task 1
...

----------- end of jspwiki document --------------

The resulting XML (Forrest xDoc v. 1.3) will have the following structure (tree outline):

----------- start xml document --------------
/document/body/section
               section (each section is a main issue)
               ...
               section
                      /title/Task Summary
                      /subsection
                                 /title/Person N
                                 /ul/li/task 1
                                    /li/task 2
                                        /ul/li/subitems/additional info
----------- end of xml document --------------

For each person in the last section, I'm extracting the tasks and creating an iCal calendar with all TODO items.

The last part of my setup is the filename conventions, which I use to get the meeting date (from which I calculate the due date:-) and the person for which I'm extracting the calendar for:

the meeting file:
Meeting_2006-19-06.jspwiki

the link to the ical file:
Tasks_2006-19-06_Sjur.ics

The link is added to the jspwiki document as a real link within [], and the final memo in Forrest will allow single-click download of calendar todo-items, with due-date. It even works with non-ASCII chars in person names, as long as they are escaped in the link:-)

Known bug:
the ical format requires Windows line endings. I'm on Unix (MacOS), and i have no idea how to enforce such line endings in the output/ download file from Forrest. Thus, it might be that the resulting calendar file is regarded invalid on some systems. It works without flaws on MacOS X, though:-)

If you find any of this useful or generalisable in any way, please let me know. I would be happy to contribute to the Forrest project!

Best regards,
Sjur