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/jquery-1.3.2.min.js" type="text/javascript"></script>
20 <script src="js/jqueryhcal/jqueryhcal.js" type="text/javascript"></script>
21 <link rel="stylesheet" type="text/css" href="js/jqueryhcal/jqueryhcal.css" />
23 <link rel="stylesheet" type="text/css" href="hcalendar.css" />
25 <title>HTML5TV all media available</title>
31 <div id="jhCalendar"></div>
37 foreach my $path ( glob 'media/*/hCalendar.html' ) {
38 next if $path =~ m{_editing};
41 my $hcal = HTML5TV::hCalendar->new( $path );
43 my $media = (split(/\//, $path))[1];
45 if ( ! -e "www/$media.html" ) {
46 warn "NO www/$media.html $!";
50 $vevents->{ $hcal->dtstart_iso } = $hcal->as_HTML(
52 [ 'a', { href => "$media.html", title => 'watch video', class => 'watch' },
53 [ 'img', { src => 'media/favicon.png', border => 0 } ],
59 $html .= join("\n", map { $vevents->{$_} } sort keys %$vevents );
68 write_file 'www/calendar.html', $html;