[Pgp-tools-commit] r684 - in trunk/keyart: . doc
Aaron Toponce
atoponce-guest at moszumanska.debian.org
Wed Jul 9 02:21:38 UTC 2014
Author: atoponce-guest
Date: 2014-07-09 02:21:38 +0000 (Wed, 09 Jul 2014)
New Revision: 684
Modified:
trunk/keyart/doc/keyart.1
trunk/keyart/keyart
Log:
add support for printing the long id in the footer badge.
Modified: trunk/keyart/doc/keyart.1
===================================================================
--- trunk/keyart/doc/keyart.1 2014-07-09 02:02:28 UTC (rev 683)
+++ trunk/keyart/doc/keyart.1 2014-07-09 02:21:38 UTC (rev 684)
@@ -7,6 +7,7 @@
.SH SYNOPSIS
.B keyart
[\-c|\-\-color]
+[\-l|\-\-longid]
[\-f|\-\-fingerprint \fIHEX\fR [\-f|\-\-fingerprint \fIHEX\fR ...]]
[\-k|\-\-keyring \fIKEYRING\fR [\-k|\-\-keyring \fIKEYRING\fR ...]]
[\fIKEYID\fR ...]
@@ -33,6 +34,11 @@
.B \-c | \-\-color
Print the ASCII art using ANSI color to the terminal.
.TP 8
+.B \-l | \-\-longid
+Print the 16-character long ID of a on OpenPGP key in the footer badge. Default
+is to print the 8-character short ID. Silently ignored if "\fB\-f |
+\-\-fingerprint \fIHEX\fR" is passed.
+.TP 8
.B \-f | \-\-fingerprint \fIHEX\fR
Any arbitrary hexadecimal string of any length. Could be an MD5, SHA1, SHA2, or
SHA3 hexadecimal checksum. Useful for comparing and analyzing potential
Modified: trunk/keyart/keyart
===================================================================
--- trunk/keyart/keyart 2014-07-09 02:02:28 UTC (rev 683)
+++ trunk/keyart/keyart 2014-07-09 02:21:38 UTC (rev 684)
@@ -12,12 +12,14 @@
description='Creates ASCII art from OpenPGP keys.')
PARSER.add_argument('-c', '--color', help='Print the art with ANSI color.',
action='store_true')
+PARSER.add_argument('-l', '--longid', action='store_true',
+ help='Print the 16-character long ID of a key.')
+PARSER.add_argument('-f', '--fingerprint', type=str, metavar=('HEX'),
+ action='append',
+ help='A hexadecimal string representing a fingerprint.')
PARSER.add_argument('-k', '--keyring', type=str, metavar=('KEYRING'),
action='append',
help='A publicly exported OpenPGP key or keyring.')
-PARSER.add_argument('-f', '--fingerprint', type=str, metavar=('HEX'),
- action='append',
- help='A hexadecimal string representing a fingerprint.')
PARSER.add_argument('keyid', type=str, nargs='*', metavar=('KEYID'),
help='A key identifier (email, ID, fingerprint, etc.).')
ARGS = PARSER.parse_args()
@@ -186,7 +188,9 @@
else:
art = art.format(_get_coin(visit, ARGS.color))
- if key_size:
+ if key_size and ARGS.longid:
+ footer = "["+key_fpr[-16:]+"]"
+ elif key_size:
footer = "["+key_fpr[-8:]+"]"
else:
footer = ''
More information about the Pgp-tools-commit
mailing list