X-Git-Url: http://git.sthu.org/?a=blobdiff_plain;ds=sidebyside;f=keyanalyze%2Fscripts%2Ftop50.pl;fp=keyanalyze%2Fscripts%2Ftop50.pl;h=0bfe47f47d11095052248de9987afdc0075a845a;hb=e69aea6f5797cb54f3748b983ffc977958f347cc;hp=0000000000000000000000000000000000000000;hpb=6b7cb7ca3a817c2e0510957115a2d1f1bed5c549;p=pgp-tools.git diff --git a/keyanalyze/scripts/top50.pl b/keyanalyze/scripts/top50.pl new file mode 100755 index 0000000..0bfe47f --- /dev/null +++ b/keyanalyze/scripts/top50.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl +# this short script is for making the HTML for the top50 report monthly +# Copyright (c)2001 M. Drew Streib +# This code is released under the GPL version 2 or later. + +# NOTE: this is designed to be run one directory up, from analyze.sh + +while ($line = ) { + $line =~ /\s+(\d+)\s+((\w|\d)+)\s+((\w|\d)+)\s+((\d|\.)+)/; + $rank = $1; + $key0 = $2; + $key = $4; + $msd = $6; + $command = 'wget -O - -q "http://pgp.dtype.org:11371/pks/lookup?search=0x' + .$key.'&op=index"'; + $wget = `$command`; + $command = 'grep "'.$key.'" scripts/top50comments.txt'; + $rawcomments = `$command`; + if (!($wget =~ /\d\d\d\d\/\d\d\/\d\d (.*)( \<.*)\n/)) { + $wget =~ /\d\d\d\d\/\d\d\/\d\d (.*)/; + $name = $1; + } + else { + $name = $1; + } + if ($rawcomments) { + $rawcomments =~ /(\w|\d)+\s(.*)/; + $comments = $2; + } else { + $comments = ''; + } + print "$rank$key$name$comments$msd\n"; +}