Mojolicious::Plugin::Ical - Generate .ical documents
0.01
Mojolicious::Plugin::Ical is a Mojolicious plugin for generating iCalendar documents.
use Mojolicious::Lite; plugin ical => { properties => { calscale => "GREGORIAN" # default GREGORIAN method => "REQUEST", # default PUBLISH prodid => "-//ABC Corporation//NONSGML My Product//EN", version => "1.0", # default to 2.0 x_wr_caldesc => "Some description", x_wr_calname => "My calender", x_wr_timezone => "EDT", # default to timezone for localhost } }; get '/calendar' => sub { my $c = shift; $c->reply->ical({ events => [ { created => $date, description => $str, # http://www.kanzaki.com/docs/ical/description.html dtend => $date, dtstamp => $date, # UTC time format, defaults to "now" dtstart => $date, last_modified => $date, # defaults to "now" location => $str, # http://www.kanzaki.com/docs/ical/location.html sequence => $int, # default 0 status => $str, # default CONFIRMED summary => $str, # http://www.kanzaki.com/docs/ical/summary.html transp => $str, # default OPAQUE uid => $str, # default to md5 of the values @hostname }, ... ], }); };
$c = $c->reply->ical({ events => [...], properties => {...} });
Will render a iCal document with the Content-Type "text/calender".
events is an array ref of calendar events. properties will override the defaults given to "register".
events
properties
See "SYNOPSIS" for more details.
plugin ical => {properties => {...}};
Register "reply.ical" helper.
Copyright (C) 2014, Jan Henning Thorsen
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
Jan Henning Thorsen - jhthorsen@cpan.org
jhthorsen@cpan.org
To install Mojolicious::Plugin::Ical, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Ical
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Ical
For more information on module installation, please visit the detailed CPAN module installation guide.