Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rdf::vcard::importer(3pm) [debian man page]

RDF::vCard::Importer(3pm)				User Contributed Perl Documentation				 RDF::vCard::Importer(3pm)

NAME
RDF::vCard::Importer - import RDF data from vCard format SYNOPSIS
use RDF::vCard; use RDF::TrineShortcuts qw':all'; my $importer = RDF::vCard::Importer->new; print $_ foreach $importer->import_file('contacts.vcf'); print rdf_string($importer->model => 'RDFXML'); DESCRIPTION
This module reads vCards and writes RDF. Constructor o "new(%options)" Returns a new RDF::vCard::Importer object and initialises it. The only valid option currently is ua which can be set to an LWP::UserAgent for those rare occasions that the Importer needs to fetch stuff from the Web. Methods o "init" Reinitialise the importer. Forgets any cards that have already been imported. o "model" Return an RDF::Trine::Model containing data for all cards that have been imported since the importer was last initialised. o "import_file($filename, %options)" Imports vCard data from a file on the file system. The data is added to the importer's model (and can be retrieved using the "model" method). This function returns a list of RDF::vCard::Entity objects, so it's also possible to access the data that way. There is currently only one supported option: "lang" which takes an ISO language code indicating the default language of text within the vCard data. o "import_fh($filehandle, %options)" As per "import_file", but operates on a file handle. o "import_string($string, %options)" As per "import_file", but operates on vCard data in a string. o "import_url($url)" As per "import_file", but fetches vCard data from a Web address. Sends an HTTP Accept header of: text/directory;profile=vCard, text/vcard, text/x-vcard, text/directory;q=0.1 vCard Input vCard 3.0 should be supported fairly completely. Some vCard 4.0 constructs will also work. Much of the heavy lifting is performed by Text::vFile::asData, so this module may be affected by bugs in that distribution. RDF Output Output uses the newer of the 2010 revision of the W3C's vCard vocabulary http://www.w3.org/Submission/vcard-rdf/ <http://www.w3.org/Submission/vcard-rdf/>. (Note that even though this was revised in 2010, the term URIs include "2006" in them.) Some extensions from the namespace <http://buzzword.org.uk/rdf/vcardx#> are also output. The AGENT property is currently omitted from output. This will be added in a later version. SEE ALSO
RDF::vCard. http://www.w3.org/Submission/vcard-rdf/ <http://www.w3.org/Submission/vcard-rdf/>. <http://www.perlrdf.org/>. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT
Copyright 2011 Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-23 RDF::vCard::Importer(3pm)

Check Out this Related Man Page

RDF::iCalendar::Exporter(3pm)				User Contributed Perl Documentation			     RDF::iCalendar::Exporter(3pm)

NAME
RDF::iCalendar::Exporter - export RDF data to iCalendar format SYNOPSIS
use RDF::iCalendar; my $input = "http://example.com/calendar-data.ics"; my $exporter = RDF::iCalendar::Exporter->new; print $_ foreach $exporter->export_calendars($input); DESCRIPTION
This module reads RDF and writes iCalendar files. This is a subclass of RDF::vCard::Exporter, so it can also export vCards. Constructor o "new(%options)" Returns a new RDF::iCalendar::Exporter object. There are no valid options at the moment - the hash is reserved for future use. Methods o "export_calendars($input, %options)" 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. o "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. o "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. o "export_cards($input, %options)" See RDF::vCard::Exporter. o "export_card($input, $subject, %options)" See RDF::vCard::Exporter. RDF Input Input 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 Output The 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. 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 Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-23 RDF::iCalendar::Exporter(3pm)
Man Page