RDF::i...porter(3pm)

πŸ“¦
version 0.005 Β· 5 versions
, in debian bookworm, ubuntu noble

πŸ’– 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 shiny RDF::iCalendar::Exporter object πŸ’–

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 as export_calendars but 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 read RDF::vCard::Exporter for this one πŸ“‡
  • export_card($input, $subject, %options) β€” yeah also go read RDF::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 πŸ‘€


✍️ AUTHOR ✍️

Toby Inkster <tobyink@cpan.org>. πŸ‘‘


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