/usr/share/doc/popularity-contest/examples/bin
NameSizeModeActions
gensections.pl5090755editdlrm
popanal.py84310755editdlrm
popcon-process.sh25830755editdlrm
popcon-stat.pl58020755editdlrm
popcon.pl203210755editdlrm
prepop.pl23400755editdlrm
README.examples13950644editdlrm
Edit: /usr/share/doc/popularity-contest/examples/bin/gensections.pl (509B)
#! /usr/bin/perl -wT my $mirrorbase = "/srv/mirrors/debian"; my $docurlbase = ""; $ENV{PATH}="/bin:/usr/bin"; for (glob("$mirrorbase/dists/stable/*/binary-*/Packages.xz")) { /([^[:space:]]+)/ or die("incorrect package name"); $file = $1;#Untaint open AVAIL, "-|:encoding(UTF-8)","xzcat $file"; while() { /^Package: (.+)/ and do {$p=$1;next;}; /^Section: (.+)/ or next; $section{$p}=$1; } close AVAIL; } @pkgs=sort keys %section; for (@pkgs) { print "$_ $section{$_}\n"; }