H1x0: Obey SPDIF power setting for monitoring SPDIF recordings as far as possible.
[Rockbox.git] / www / dailymod.pl
blob8e1a48d28176c1b794a71d997e80e12fb122ce9a
1 #!/usr/bin/perl
3 require "rockbox.pm";
5 my $basedir = "/home/dast/rockbox-build/daily-build";
7 my @list=("player",
8 "recorder", "recorder8mb",
9 "fmrecorder", "fmrecorder8mb",
10 "recorderv2",
11 "ondiofm", "ondiosp",
12 "h100", "h120", "h300",
14 "ipodcolor", "ipodnano", "ipod4gray", "ipodvideo",
15 "ipod3g", "iaudiox5",
17 # install and source are special cases
18 #"install",
19 "source");
21 for(@list) {
22 my $dir = $_;
23 opendir(DIR, "$basedir/$dir") or next;
24 my @files = sort grep { /^rockbox/ } readdir(DIR);
25 closedir DIR;
27 for(@files) {
28 /(20\d+)/;
29 $date{$1}=$1;
33 for(reverse sort keys %date) {
34 my $d = $_;
35 my $nice = $d;
36 if($d =~ /(\d\d\d\d)(\d\d)(\d\d)/) {
37 $nice = "$1-$2-$3";
39 print "<table class=rockbox cellpadding=\"0\"><tr valign=top>\n";
41 $color1 -= 0x18;
42 $color2 -= 0x18;
43 $color3 -= 0x18;
45 my $count = 0;
46 my $split = int((scalar @list) / 2);
47 my $x = 0;
48 my @head;
50 foreach $t (@list) {
51 my $show = $t;
52 $show =~ s/recorder/rec/;
53 # Remove the comment below to get long names
54 $show = $longname{$t};
55 $head[$x] .= "<th>$show</th>\n";
56 $count++;
57 if ($count == $split) {
58 $x++;
61 print "$head[0]</tr><tr>\n";
63 $count = 0;
64 for(@list) {
65 my $m = $_;
66 printf "<td><img alt=\"$m\" src=\"$model{$m}\"><br>";
67 # new-style full zip:
68 my $file = "rockbox-${m}-${d}.zip";
69 if($m eq "source") {
70 $file = "rockbox-daily-${d}.tar.gz";
72 elsif($m eq "install") {
73 $file = "Rockbox-${d}-install.exe";
75 if( -f "$basedir/$m/$file") {
76 printf "<a href=\"http://download.rockbox.org/daily/$_/$file\">latest</a>",
78 print "<p><a href=\"/dl.cgi?bin=$_\">older</a></td>\n";
80 $count++;
81 if ($count == $split) {
82 print "</tr><tr>$head[1]</tr><tr>\n";
85 print "</tr>\n";
86 last;
88 print "</table>\n";