my $input = "http://example.com/calendar-data.ics";
my $exporter = RDF::iCalendar::Exporter->new;
print $_ foreach $exporter->export_calendars($input);
DESCRIPTIONThis module reads RDF and writes iCalendar files.
This is a subclass of RDF::vCard::Exporter, so it can also export vCards.
Returns a new RDF::iCalendar::Exporter object.
There are no valid options at the moment - the hash is reserved for future use.
Returns a list of iCalendars found in the input, in no particular order.
The input may be a URI, file name, RDF::Trine::Model or anything else that can be handled by the "rdf_parse" method of RDF::TrineShortcuts.
Each item in the list returned is an RDF::iCalendar::Entity, though that class overloads stringification, so you can just treat each item as a string mostly.
"export_calendar($input, $subject, %options)"
As per "export_calendars" but exports just a single calendar.
The subject provided must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type icaltzd:Vcalendar.
"export_component($input, $subject, %options)"
Exports a component from a calendar - e.g. a single VEVENT
The subject provided must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type icaltzd:Vevent, icaltzd:Vtodo or similar.
"export_card($input, $subject, %options)"
RDF InputInput is expected to use the newer of the 2005 revision of the W3C's vCard vocabulary <http://www.w3.org/TR/rdfcal/>. (Note that even though this was revised in 2005, the term URIs include ``2002'' in them.)
Some extensions from the namespace <http://buzzword.org.uk/rdf/icaltzdx#> are also supported.
iCalendar OutputThe output of this module aims at iCalendar (RFC 2445) compliance. In the face of weird input data though, (e.g. an DTSTART property that is a URI instead of a literal) it can pretty easily descend into exporting junk, non-compliant iCalendars.
The output has barely been tested in any iCalendar-supporting software, so beware.
AUTHORToby Inkster <[email protected]>.
COPYRIGHTCopyright 2011, 2013 Toby Inkster
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIESTHIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.