3
3
# gpg-key2ps: convert a PGP/GnuPG key into paper slips.
4
4
# Copyright (C) 2001-2005 Simon Richter
5
# Copyright (C) 2005-2006 Thijs Kinkhorst
6
# Copyright (C) 2005-2006 Christoph Berg <cb@df7cb.de>
5
# Copyright (C) 2005-2007 Thijs Kinkhorst
6
# Copyright (C) 2005-2008 Christoph Berg <cb@df7cb.de>
7
7
# Licenced under the GNU General Public License,
8
8
# version 2 or later.
10
# $Id: gpg-key2ps 296 2006-08-16 11:44:38Z myon $
10
# $Id: gpg-key2ps 372 2008-03-16 18:41:31Z myon $
15
my $version = '$Rev: 296 $';
15
my $version = '$Rev: 372 $';
16
16
$version =~ s/\$Rev:\s*(\d+)\s*\$/$1/;
17
17
my $revokestyle = "hide";
18
19
my $creationdate = scalar(localtime);
22
print $fd "gpg-key2ps $version - (c) 2001-2006 Simon Richter, Thijs Kinkhorst, Christoph Berg\n";
23
print $fd "gpg-key2ps $version - (c) 2001-2008 Simon Richter, Thijs Kinkhorst, Christoph Berg\n";
26
27
my ($fd, $exitcode) = @_;
29
Usage: $0 [-p papersize] [-r revoked-style] keyid-or-name ...
30
Usage: $0 [-p papersize] [-r revoked-style] [-1] keyid-or-name ...
33
hide - Don't show revoked uids (default)
34
hide - Don't show revoked uids and subkeys (default)
34
35
grey - Print text in grey
35
36
note - Add "[revoked]"
36
37
show - List revoked uids normally
37
38
strike - Strike through lines
39
-1 Only print one column, for extra wide keys
53
55
'--paper-size=s' => \$opts->{papersize},
54
56
'-r=s' => \$opts->{revokestyle},
55
57
'--revoked-style=s' => \$opts->{revokestyle},
57
60
usage(\*STDERR, 1);
166
50 y moveto (sub) show
167
70 y moveto show showAlgorithm (/) show show
162
174
# output the desired display for revoked uids
163
175
if ( $revokestyle eq "grey" ) {
165
print " .5 setgray\n";
167
print " 0 setgray\n";
169
188
} elsif ( $revokestyle eq "note" ) {
171
print " 50 y moveto (uid) show\n";
172
print " 200 y moveto show ( [revoked]) show\n";
191
50 y moveto (uid) show
192
200 y moveto show ( [revoked]) show
175
200
} elsif ( $revokestyle eq "show" ) {
176
print "/revuid { uid } def\n";
177
205
} elsif ( $revokestyle eq "strike" ) {
180
print " 45 y 9 add moveto h 2 div 45 sub y 18 add lineto stroke\n";
209
45 y 9 add moveto h 2 div 45 sub y 18 add lineto stroke
213
45 y 9 add moveto h 2 div 45 sub y 18 add lineto stroke
187
50 y moveto (sub) show
188
70 y moveto show showAlgorithm (/) show show
226
253
next if $revokestyle eq "hide";
229
s/^sub:[^:]*:([^:]*):([0-9]*):.{8,8}(.{8,8}):([^:]*):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:.*/ ($4) ($3) $2 ($1) sbk/;
256
s/^sub:[^r:]*:([^:]*):([0-9]*):.{8,8}(.{8,8}):([^:]*):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:.*/ ($4) ($3) $2 ($1) sbk/;
257
if (s/^sub:r[^:]*:([^:]*):([0-9]*):.{8,8}(.{8,8}):([^:]*):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:.*/ ($4) ($3) $2 ($1) revsbk/) {
258
next if $revokestyle eq "hide";
231
261
# print this line
304
342
=item B<-r> B<--revoked-style> I<revoked-style>
306
Select how to mark revoked UIDs. Five styles are available:
344
Select how to mark revoked UIDs and subkeys. Five styles are available:
307
345
B<hide> don't show at all (default),
308
346
B<show> show normally,
309
347
B<grey> display in 50% grey,
332
http://pgp-tools.alioth.debian.org/
373
=item http://pgp-tools.alioth.debian.org/
375
The homepage of B<gpg-key2ps> and the other tools bundled in B<signing-party>.
377
=item http://www.debian.org/events/materials/business-cards/
379
B<gpg-key2ps> prints plain fingerprint slips. If you are looking for something
380
more stylish, look at these latex templates for business cards that also
381
include fingerprints.
334
385
=head1 AUTHORS AND COPYRIGHT
336
(c) 2001 - 2005 Simon Richter <sjr@debian.org>
338
(c) 2005 Thijs Kinkhorst <thijs@kinkhorst.com>
340
(c) 2005 Christoph Berg <cb@df7cb.de>
389
=item (c) 2001-2005 Simon Richter <sjr@debian.org>
391
=item (c) 2005-2007 Thijs Kinkhorst <thijs@kinkhorst.com>
393
=item (c) 2005-2008 Christoph Berg <cb@df7cb.de>