Here is the "every hour picture" from Hessdalen AMS. This page is updated with a new picture
every hour.
#!/usr/bin/perl
#
# Copyright (c) 1997 Martin Ranang Thorsen
$cells = 28;
$format = '.jpg';
$metadir = "/hourlydir";
$html_dir = "/ams".$metadir;
$hourly_dir = "/local/hessdalen/html".$html_dir;
sub print_http_header {
print "Content-type: text/html\n\n";
}
sub print_html_link {
my $file = @_[0];
my $year, $month, $day, $hour, $minute, $second;
($year, $month, $day, $hour, $minute, $second) = $file =~
/^hourly-(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$format$/;
print " | \n";
print "";
print "Hourly $hour:$minute:$second $day.$month.$year";
print "\n";
print " | \n";
}
sub print_html_table {
print "\n\n";
my $i, $file, @files;
opendir(DIR, "$hourly_dir") || die "Error: opening $alarm_dir.\n";
@files = reverse(sort(readdir(DIR)));
$i = 0;
foreach $file (@files) {
if(($file =~ /^hourly-\d{14}$\$format/) && ($i < $cells)) {
if(!($i % 4) && $i) {
print "
\n\n";
}
print_html_link($file);
$i++;
}
}
closedir(DIR);
print "
\n";
}
print_http_header();
print_html_table();
exit(0)