7 use HTML5TV::hCalendar;
10 my $html = qq|<!DOCTYPE html>
14 <meta charset="utf-8" />
16 <link rel="icon" type="image/png" href="media/favicon.png">
18 <script src="js/jqueryhcal/jqueryhcal.js" type="text/javascript"></script>
19 <link rel="stylesheet" type="text/css" href="js/jqueryhcal/jqueryhcal.css" />
21 <link rel="stylesheet" type="text/css" href="hcalendar.css" />
23 <title>HTML5TV all media available</title>
29 <div id="jhCalendar"></div>
35 foreach my $path ( glob 'media/*/hCalendar.html' ) {
36 next if $path =~ m{_editing};
39 my $hcal = HTML5TV::hCalendar->new( $path );
41 my $media = (split(/\//, $path))[1];
43 if ( ! -e "www/$media.html" ) {
44 warn "NO www/$media.html $!";
48 $vevents->{ $hcal->dtstart_iso } = $hcal->as_HTML(
49 [ 'a', { href => "$media.html", title => 'watch video', class => 'watch' },
50 [ 'img', { src => 'media/favicon.png' } ],
55 $html .= join("\n", map { $vevents->{$_} } sort keys %$vevents );
64 write_file 'www/calendar.html', $html;