");
printf HTML ("
Statistics for the section %-16s sorted by fields: ",$sec);
print_by (".",$_) for (@fields);
print HTML ("\n
\n");
printf HTML ("
First packages in subsections for each fields \n");
printf HTML ("
Statistics for subsections sorted by fields\n
\n");
for $dir (sort readdir SEC)
{
-d "$popcon/$sec/$dir" or next;
$dir !~ /^\./ or next;
printf HTML ("%-16s : ",$dir);
print_by ($dir,$_) for (@fields);
print HTML ("\n");
}
print HTML ("\n \n");
printf HTML ("
");
&legend;
htmlfooter;
closedir SEC;
close HTML;
}
for $sec (@dists)
{
open HTML , ">:utf8", "$popcon/$sec/first.html";
opendir SEC,"$popcon/$sec";
popconintro($name, $sec, "first.html");
printf HTML ("");
printf HTML ("
First package in section %-16s for fields: ",$sec);
for $f (@fields)
{
print_pkg $winner{"$sec/$f"};
}
print HTML ("\n
\n");
printf HTML ("
Statistics by subsections sorted by fields \n");
printf HTML ("
First package in subsections for fields\n
\n");
printf HTML ("%-16s : ","subsection");
for $f (@fields)
{
printf HTML ("%-20s ",$f);
}
print HTML ("\n","_"x120,"\n");
for $dir (sort readdir SEC)
{
-d "$popcon/$sec/$dir" or next;
$dir !~ /^\./ or next;
printf HTML ("%-16s : ",$dir);
for $f (@fields)
{
print_pkg $winner{"$sec/$dir/$f"};
}
print HTML ("\n");
}
print HTML ("\n \n");
printf HTML ("
");
&legend;
htmlfooter;
closedir SEC;
close HTML;
}
open HTML , ">:utf8", "$popcon/index.html";
popconintro($name, "", "index.html");
printf HTML ("");
printf HTML ("
Download
");
printf HTML ("
Statistics for the whole archive sorted by fields:
");
print_by (".",$_) for (@fields);
print HTML ("\n \n");
printf HTML ("
Statistics by maintainers sorted by fields:
");
print_by ("maint",$_) for (@fields);
print HTML ("\n \n");
printf HTML ("
Statistics by source packages (sum) sorted by fields:
");
print_by ("source",$_) for (@fields);
print HTML ("\n \n");
printf HTML ("
Statistics by source packages (max) sorted by fields:
");
print_by ("sourcemax",$_) for (@fields);
print HTML ("\n \n");
printf HTML ("
Statistics for sections sorted by fields\n
\n");
for $dir ("main","contrib","non-free","non-US","unknown")
{
-d "$popcon/$dir" or next;
$dir !~ /^\./ or next;
if ($dir eq "unknown")
{
printf HTML ("%-16s : ",$dir);
}
else
{
printf HTML ("%-16s : ",$dir);
}
print_by ($dir,$_) for (@fields);
print HTML ("\n");
}
printf HTML ("\n");
rawresults($numsub, $popfile);
print HTML <<'EOF';
Statistics per Debian architectures
EOF
for $f (grep { $_ ne 'unknown' } sort keys %arch)
{
my ($port)=split('-',$f);
$port="$port/";
$port="kfreebsd-gnu/" if ($port eq "kfreebsd/");
printf HTML "%-16s : %-10s graph\n",$f,$arch{$f};
}
if (defined $arch{"unknown"}) {
printf HTML "%-16s : %-10s graph\n","unknown",$arch{"unknown"}
}
print HTML " | \n";
print HTML <<'EOF';
|
EOF
print HTML <<'EOF';
Statistics per popularity-contest releases
EOF
for $f (grep { $_ ne 'unknown' } sort keys %release)
{
my($name) = $f;
$name = "$f ($popconver{$f})" if (defined($popconver{$f}));
printf HTML "%-25s : %-10s \n",$name,$release{$f};
}
if (defined $release{"unknown"}) {
printf HTML "%-25s : %-10s \n","unknown",$release{"unknown"};
}
print HTML " | \n";
print HTML <<'EOF';
|
EOF
print HTML <<'EOF';
Statistics per distributions reporting to Debian
EOF
for $f (grep { $_ ne 'unknown' } sort keys %vendor)
{
my($name) = $f;
printf HTML "%-25s : %-10s \n",$name,$vendor{$f};
}
if (defined $vendor{"unknown"}) {
printf HTML "%-25s : %-10s \n","unknown",$vendor{"unknown"};
}
print HTML " | \n";
print HTML <<'EOF';
|
EOF
printf HTML ("
");
htmlfooter;
close HTML;
}
sub read_packages
{
my ($file,$dist);
for $file ("slink","slink-nonUS","potato","potato-nonUS",
"woody","woody-nonUS", values %popconver)
{
open AVAIL, "<:utf8", "$file.sections" or die "Cannot open $file.sections";
while(