Re: graphing the debian keyring
Guy Maor <maor@debian.org> writes:
> I got some nice results with it. Look in ~maor/keys.ps.
Incidentally, here is the script I used to produce dot format.
Davinci sure has a complicated input. ;-b
#!/usr/bin/perl
while (<>) {
chop;
$p = getname($_,4) if /^pub/;
do {
$s = getname($_,3);
$k{$p}{$s} = 1 if ($s !~ /Unknown signator/);
} if /^sig/;
}
print "digraph keys {\n";
for $p (keys %k) {
for $s (keys %k) {
print "\"$s\" -> \"$p\";\n" if ($k{$p}{$s} && $p ne $s);
}
}
print "}\n";
sub getname {
$n = (split(' ',$_[0],$_[1]))[$_[1]-1];
$n =~ s/\s*\<.*//;
$n;
}
Guy
Reply to: