Errto has asked for the wisdom of the Perl Monks concerning the following question:

I would like to generate iCalendar (RFC 2445) files that I can send as meeting requests to, in my specific case, users of Microsoft Outlook/Exchange. Searching on CPAN revealed a few modules for this including Data::ICal and Net::ICal. I am looking for recommendations / tips / pitfalls / working examples involving these or any similar modules or online sources discussing the same (a quick Google didn't reveal any). Cheers.

Replies are listed 'Best First'.
Re: meeting requests with iCalendar
by gam3 (Curate) on Feb 15, 2006 at 15:17 UTC
    Data::ICal would be my choice.

    It is newer and better maintained. Also I could not install Net::ICal do to errors.

    You may also want to take a look at Text::vFile.

    -- gam3
    A picture is worth a thousand words, but takes 200K.
      I took a look at Text::vFile but as far as I can tell it can only read vfiles, whereas I need to create a new one from scratch. Also, Data::ICal seems a little short on examples - do you know of any resources on it besides the POD? In particular, I haven't figured out how to create an attendee record. Cheers.
        Here is how I add an ATTENDEE:
        my $vevent = Data::ICal::Entry::Event->new(); $vevent->add_properties( attendee => [ 'mailto:gam3(allen)@gam3.bet', { 'CN' => 'G. Allen Morris III', 'ROLE' => 'REQ-PARTICIPANT', 'PARTSTAT' => 'NEEDS-ACTION', 'RSVP' => 'TRUE' }, ], );
        -- gam3
        A picture is worth a thousand words, but takes 200K.
Re: meeting requests with iCalendar
by mattr (Curate) on Feb 17, 2006 at 12:32 UTC
    I was writing a cgi system to create meetings with coaches and was using Date::ICal to make a Net::ICal::Event I believe (skimming some code from 2004).

    However due to requirements changes and especially speed I ended up printing VCALENDAR files by scratch made up of VEVENTS, which were built from scheduling info in my db (not ICal objects). This was viewed in phpicalendar which is a very pretty, readonly ICalendar viewer. The admin ended up uploading calendars made in Outlook. Having the files already there on the hard disk in the public html folder was very useful, phpicalendar used that to display schedules.

    I wanted phpicalendar to call a generator that would produce a calendar for it in realtime but couldn't get it going and it became moot. Phpicalendar works great, for what it does. The perl support for ICal and the travesty of reefknot and general perl ICal related unfinished modules and myserious docs wasted me a LOT of time. However some minimal things are not too bad. I'd say keep a close eye on what you really need to do, see if you really need ICal modules to do it, be sure what clients and browsers will be used (there are more out now I believe mozilla has something going) and that they are acceptable to everyone first. Go read the ICal RFC and general documentation. You may be able to get away with rolling your own. Also consider subscribing to some of the national holiday calendars online to display as a composite.