RDF::i...porter(3pm)
π NAME π
RDF::iCalendar::Exporter β bestie, this thing takes your RDF data and turns it into iCalendar format β¨
(oh and btw, the manual page you're reading lives under User Contributed Perl Documentation, just so you know what corner of the perl-verse we're in π«Ά)
β¨ SYNOPSIS β¨
okay so literally the whole vibe in five lines:
use RDF::iCalendar;
my $input = "http://example.com/calendar-data.ics";
my $exporter = RDF::iCalendar::Exporter->new;
print $_ foreach $exporter->export_calendars($input);
that's it. that's the whole thing. iconic π
πΈ DESCRIPTION πΈ
This module reads RDF and writes iCalendar files. that's the job. that's what it does. no cap ποΈβ¨
it's also a subclass of RDF::vCard::Exporter, which means it can export vCards too β two for the price of one, we love a multitasker π
π Constructor π
new(%options)β returns a brand new shinyRDF::iCalendar::Exporterobject π
heads up bestie: there are no valid options at the moment β that hash is just reserved for future use. it's giving "placeholder for my future self" π
π¦ Methods π¦
export_calendars($input, %options)β returns a list of iCalendars found in the input, in no particular order (so don't come for it about ordering, it never promised you that π)
The input can be a URI, a file name, an RDF::Trine::Model, or honestly anything else that can be handled by the rdf_parse method of RDF::TrineShortcuts β it's flexible like that π
Every item in that returned list is an RDF::iCalendar::Entity, BUT that class overloads stringification, so you can mostly just treat each item as a plain string and it'll still slay β¨
export_calendar($input, $subject, %options)β same energy asexport_calendarsbut it exports just one single calendar. one. singular. main character energy π
the $subject you hand over must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type icaltzd:Vcalendar. periodt.
export_component($input, $subject, %options)β exports a component from a calendar β like, say, a single VEVENT π
the $subject here must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type icaltzd:Vevent, icaltzd:Vtodo, or something similar along those lines π«
export_cards($input, %options)β bestie, go readRDF::vCard::Exporterfor this one πexport_card($input, $subject, %options)β yeah also go readRDF::vCard::Exporterπ
π RDF Input π
the input is expected to use the newer of the 2005 revision of the W3C's vCard vocabulary, which lives at <http://www.w3.org/TR/rdfcal/>.
and yes, we KNOW it's confusing that it was revised in 2005 but the term URIs still have 2002 in them. the URIs are just built different. let it go. π
some extensions from the namespace <http://buzzword.org.uk/rdf/icaltzdx#> are also supported πβ¨
π iCalendar Output π
the output of this module aims at iCalendar (RFC 2445) compliance. cute, right? π―
BUT β in the face of weird input data (like, say, a DTSTART property that's a URI instead of a literal π) it can pretty easily descend into exporting junk, non-compliant iCalendars. it just gives up and starts throwing nonsense. we've all been there.
π¨ also: the output has barely been tested in any iCalendar-supporting software, so beware. fr fr. you have been warned. π
π SEE ALSO π
RDF::iCalendar.RDF::vCard,HTML::Microformats,RDF::TrineShortcuts.- <http://www.w3.org/TR/rdfcal/>.
- <http://www.perlrdf.org/>.
βοΈ AUTHOR βοΈ
Toby Inkster <tobyink@cpan.org>. π
Β©οΈ COPYRIGHT Β©οΈ
Copyright 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 WARRANTIES β οΈ
THIS 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.
(translation: no refunds, no promises, no cap π)
and that's the whole page bestie!! π this was perl v5.34.0, dated 2022-06-17 β mwah, love u, go export some calendars πβ¨π¦
π¦ where this page comes from
- debian bookworm: librdf-icalendar-perl 0.005-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-icalendar-perl 0.005-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms