Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
executable file 41 lines (33 sloc) 872 Bytes
use strict;
use warnings;
use 5.010;
use LWP::UserAgent;
use XML::RSS;
use Data::ICal;
use Data::ICal::Entry::Event;
use DateTime::Format::Strptime;
use DateTime::Format::ICal;
my $rss_url = shift || die "Must give RSS url";
my $dt_p = DateTime::Format::Strptime->new(
pattern => '%a, %d %B %Y %H:%M:%S %Z',
on_error => 'croak',
my $rss_p = XML::RSS->new;
my $ua = LWP::UserAgent->new(agent => 'Foo');
my $resp = $ua->get($rss_url);
my $rss = $rss_p->parse($resp->decoded_content);
my $ical = Data::ICal->new;
foreach (@{$rss->{items}}) {
my $entry = Data::ICal::Entry::Event->new;
my $date = DateTime::Format::ICal->format_datetime(
summary => $_->{title},
dtstart => $date,
dtend => $date,
print $ical->as_string;
Jump to Line
Something went wrong with that request. Please try again.