Our organisation has been offering a series of summer lectures since
January 1997. They
are
held yearly,
every 2nd year (1999, 2001, etc),
every Sunday
in January
at 8:30 and
repeated at 9:30.
HTML
my $doc = HTML::Microformats->new_document($hcalendar, 'http://hcal.example.net/')->assume_all_profiles;
my @objects = $doc->objects('hCalendar');
print $objects[0]->to_icalendar;
#print rdf_string($doc->model =>'RDFXML');
#print "========\n";
#my @cals = RDF::iCalendar::Exporter->new->export_calendars($doc->model);
#print "========\n";
#print $_ foreach @cals ;
01basic.t 000664 001750 001750 112 12406374114 14436 0 ustar 00tai tai 000000 000000 RDF-iCalendar-0.005/t use Test::More tests => 1;
BEGIN { use_ok('RDF::iCalendar::Exporter') };
02rdf2ical.t 000664 001750 001750 47407 12406374114 15126 0 ustar 00tai tai 000000 000000 RDF-iCalendar-0.005/t use strict;
use warnings;
use Test::More;
use RDF::iCalendar;
my $ri = "RDF::iCalendar::Exporter"->new;
my @cals = $ri->export_calendars([\*DATA, as => "RDFXML", base => "http://localhost/"]);
is(
scalar(@cals),
1,
'one calendar returned',
);
my @components = @{ $cals[0]->components };
is(
scalar(@components),
7,
'... which contains seven components',
);
my ($xmas) = grep $_->matches(UID => qr{^http://hcal\.example\.net/#xmas$}), @components;
ok(
defined $xmas,
'... one of which is Christmas!'
);
$xmas =~ s/\r\n/\n/g;
is($xmas, <<'XMAS', 'Christmas stringifies!!!');
BEGIN:VEVENT
ATTENDEE;CN=Santa Claus;CUTYPE=individual;ROLE="Required for mer
riment:";VALUE=TEXT:Santa Claus
COMMENT:Yearly period of festive merriment.
DTSTART;VALUE=DATE:00011225
GEO:12;34
LOCATION:12\;34
RRULE;VALUE=RECUR:FREQ=YEARLY
SUMMARY:Christmas
UID;VALUE=URI:http://hcal.example.net/#xmas
END:VEVENT
XMAS
done_testing;
__DATA__