X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=gpgsigs%2Fgpgsigs;h=e27b33691561e3c40d7b305d87258feb6e11ec6f;hb=c201de5e807680720bea0f506b2c48ca30707280;hp=2c4da429ac0290e5ea9ac7a82122f354bedfc503;hpb=7e43974c6c93dde1a7014ecf40c8308f9eeac51b;p=pgp-tools.git diff --git a/gpgsigs/gpgsigs b/gpgsigs/gpgsigs index 2c4da42..e27b336 100755 --- a/gpgsigs/gpgsigs +++ b/gpgsigs/gpgsigs @@ -20,6 +20,7 @@ # see the Debian changelog for further changes. my $VERSION = qq$Rev$; +$ENV{PATH} .= ":/usr/share/signing-party"; use strict; use warnings; @@ -152,11 +153,12 @@ print STDERR "Running --list-sigs, this will take a while "; open SIGS, "gpg --fixed-list-mode --with-colons --list-sigs @mykeys @keys 2>/dev/null |" or die "can't get gpg listing"; -my ($key, $uid, $sigs); +my ($key, $uid, $sigs, $photocount); while () { if ( m/^pub:(?:.*?:){3,3}([0-9A-F]{16,16}):/ ) { $key = $1; print STDERR "."; + undef $photocount; next; } if ( m/^uid:(.):(?:.*?:){7,7}(.*):/s ) { @@ -177,8 +179,11 @@ while () { my $size = $3 - 19; # FIXME: find a nicer way to find out picture size $uid = "[jpeg image of size $size]"; next if $uidstatus eq "r"; - if ($latex) { - system "gpg --photo-viewer 'convert - %k.eps' --list-options show-photos --list-key $key > /dev/null"; + if ($latex and not $photocount) { # call once per key + my ($shortkey) = substr $key, -8; + system "rm $shortkey.[1-9]*.eps"; + system "gpg --photo-viewer 'gpgsigs-eps-helper $shortkey' --list-options show-photos --list-key $key > /dev/null"; + $photocount = 1; } my ($shortkey) = substr $key, -8; push @{$uids{$shortkey}}, $uid; @@ -318,6 +323,7 @@ while () { # next; #} print WRITE; + undef $photocount; next; } @@ -334,8 +340,9 @@ while () { foreach $uid (@{$uids{$key}}) { print WRITE print_tag($key, $uid) . " $uid\n"; if ($latex and ($uid =~ /^\[jpeg image/)) { + $photocount++; print WRITE "\\begin{flushright}\n"; - print WRITE "\\includegraphics[height=3cm]{$key.eps}\n"; + print WRITE "\\includegraphics[height=3cm]{$key.$photocount.eps}\n"; print WRITE "\\end{flushright}\n"; } } @@ -425,6 +432,7 @@ since the input text was generated. =item B<--latex> Generate LaTeX output, including photo IDs. Implies B<--refresh>. +B This writes eps files to the current directory. =item I