Fixed both analyze.sh and top50.pl scripts.
authorthialme-guest <thialme-guest@b513b33f-fedd-0310-b452-c3deb5f4c849>
Mon, 30 Mar 2009 21:41:47 +0000 (21:41 +0000)
committerthialme-guest <thialme-guest@b513b33f-fedd-0310-b452-c3deb5f4c849>
Mon, 30 Mar 2009 21:41:47 +0000 (21:41 +0000)
  [analyze.sh]
  * Made the entries in the msd-sorted.txt file sorted.
  * Used msd.txt file as input for top50.pl. The current pattern in top50.pl
    does not match data from the msd-sorted.txt file.
  * Allowed the top1000 report to report the first 1000 ranks by passing
    *-n 1000* to top50.pl. Set to 50 by default.

  [top50.pl]
  * Fixed the error message when a line from stdin does not match the pattern.

git-svn-id: svn://svn.debian.org/pgp-tools/trunk@422 b513b33f-fedd-0310-b452-c3deb5f4c849

keyanalyze/analyze.sh
keyanalyze/scripts/top50.pl

index 65bc57750973a5d44935d58c92f77ba11da62d6a..ae1d90dbcf477e6a36f28e85c23f3b932b8adee8 100755 (executable)
@@ -13,10 +13,10 @@ keyanalyze
 # html beautification and reports and such
 # comment this out if you don't want all the stuff in the report
 # at http://dtype.org/keyanalyze/
-cat output/msd.txt | sort -n -k 3 | nl -s ' ' > output/msd-sorted.txt
-head -n 50 output/msd-sorted.txt | scripts/top50.pl > output/top50table.html
+cat output/msd.txt | sort -k 3 | nl -s ' ' > output/msd-sorted.txt
+cat output/msd.txt | scripts/top50.pl > output/top50table.html
 cat scripts/report_top.php output/top50table.html \
        scripts/report_bottom.php > output/report.php
-head -n 1000 output/msd-sorted.txt | scripts/top50.pl > output/top1000table.html
+cat output/msd.txt | scripts/top50.pl -n 1000 > output/top1000table.html
 cat scripts/1000_top.php output/top1000table.html \
        scripts/1000_bottom.php > output/report_1000.php
index 5a30de65b00e93539f1397e824dbb0ef1138d7b7..da51ebfeaca338bffe9876e043a9bd1f60c28723 100755 (executable)
@@ -34,7 +34,7 @@ if (open F, $comments) {
 
 my %msd;
 while (my $line = <>) {
-       $line =~ /^\w+\s+(\w+)\s+([\d\.]+)/ or die "cannot parse line $.: $_";
+       $line =~ /^\w+\s+(\w+)\s+([\d\.]+)/ or die "cannot parse line $.: $line";
        $msd{$1} = $2;
 }