Question
I have a block of automatically generated data that starts with a heading and has date informtion on subsequent lines. I need to extact the entry and reformat it as a bullet list suitable for
CalendarPlugin.
A typical entry would look like this:
---+++ Digital Forensics Research Workshop (DFRWS 05)
*WHERE*: New Orleans, LA %BR%
*WHEN*: Aug 17-19
%BR% http://www.dfrws.org
There may be additional text but the record will terminated with a blank line.
(Of course there may be the ^M on some systems

)
The output format would need to be
- 17 Aug - 19 Aug - Digital Forensics Research Workshop (DFRWS 05) New Orleans, LA
It may be possible to alter the feed to change the date format.
Environment
--
AntonAylward - 04 Nov 2005
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Should the data be extracted from a TWiki Plugin or is a simple command line Perl script sufficient enough?
--
JoachimBlum - 28 Nov 2005
Anton - it was precisely for this kind of situation that I proposed the idea of
DynamicDataSets. But alas, we don't have anything like that currently. As far as I can figure there is no way to achieve what you want
because CalendarPlugin will not recognize a list of events generated by a search. I did a little experiment to see if I could get around this limitation by using
VarCachePlugin to cache the topic that contained a FormattedSearch-generated list of events, but it still didn't work.

It's a shame that we have several caching plugins but _none of them allows us to cache specific searches such that this data can then be used in calendars, menus, etc.
--
LynnwoodBrown - 28 Nov 2005
Hm, as far as I remember the
CalendarPlugin DOES recognize a list of events generated by a search (otherwise it would be pretty useless), but this doesn't solve
Antons search problem, but of course you're right about the caching (saving a snapshot of a search as searchable text) issue. The search needed here would also be much easier if we already had the
TopicObjectModel. I'm quiet now, cause of no use regarding the search, sorry.
--
FranzJosefSilli - 28 Nov 2005
Franz - you comment that
CalendarPlugin does recognize list of events generated by a search sent me back to research this since I have been wanting it for so long. Indeed, I completely agree
CalendarPlugin's utility is pretty limited without that. What I found was that this does indeed work
as long as the search and calendar are in the same topic. In my opinion, that still fairly seriously limits the plugin's usefullness since it means that there is no way to display the calendar by itself without the list of events. (Well, I guess you
could hide the search with html comments.)
So back to Anton's question, I
think I was able to create a prototype of what you want
here
. The search is somewhat simplified but basically does what you describe. One specific simplification: I assumed that the dates were already in the proper format. I think it
should be possible to reformat the dates within the FormattedSearch (assuming they are in a consistant format) but it would one ugly bit of regex. So I think it would be better if, as you suggested, that you "alter the feed to change the date format" so that it's already in the correct format.
--
LynnwoodBrown - 28 Nov 2005
In regards to the automatically generated content, it might be ebtter to generate it in a format that is easy to read for humans and is easy to parse with a
FormattedSearch. Two examples:
Digital Forensics Research Workshop (DFRWS 05)
Digital Forensics Research Workshop (DFRWS 05)
The
CalendarPlugin should be made aware of dynamic searches.
--
PeterThoeny - 02 Jan 2006
The
CalendarPlugin already IS (ever WAS) aware of dynamic searches! It wouldn't have been very useful if not.
--
FranzJosefSilli - 03 Jan 2006