]> git.gir.st - ttxd.git/blob - ORFText.cgi
update to dvb-t2 (new hardware, software)
[ttxd.git] / ORFText.cgi
1 #!/usr/bin/perl -X
2
3 use strict;
4 use warnings;
5 use 5.010;
6
7 my @pages = (101, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 102, 136, 137, 138, 139, 140, 141, 142, 143, 706, 108, 461, 462, 463, 464, 465);
8
9 print "Content-type: text/html\n\n";
10
11 print "<html><head><meta charset='utf-8'><meta name='viewport' content='width=device-width, initial-scale=1'><title>ORFText News</title><style>body{max-width:40em;text-align:justify;margin:auto;padding:.5em;font-family:serif;}a:link,a:visited{color:grey}</style></head><body bgcolor=black style='color:#ffffff'>";
12 print "<h1>ORFText News</h1>";
13 print '<a href="#pol">pol</a> | <a href="#loc">loc</a> [<a href="#tir">T</a>] | <a href="#web">web</a>';
14
15 foreach (@pages) {
16 if ($_ == 101) {
17 print "<a name=pol></a><h2>Politik</h2>";
18 } elsif ($_ == 102) {
19 print "<a name=loc></a><h2>Chronik</h2>";
20 } elsif ($_ == 706) {
21 print "<a name=tir></a><h3>Tirol</h3>";
22 } elsif ($_ == 108) {
23 print "<a name=web></a><h2>Web/Media</h2>";
24 }
25 my @subpages = glob "/run/ttxd/spool/2/${_}_*.vtx";
26 foreach (@subpages) {
27 my $file_age = time() - (stat ($_))[9];
28 print `./html.pl $_` if $file_age < 1000;
29 #print "<li>$_ : $file_age</li>" if $file_age > 1000;
30 }
31 #print `./html.pl /run/ttxd/spool/2/${_}_00.vtx` if -e "/run/ttxd/spool/2/${_}_00.vtx";
32 }
33 print "</body></html>";
Imprint / Impressum