Name

get-gpg-keys — lists GPG keys

ATTRIBUTES

Attribute Pos. Req. Default Description
dir Yes No GPG home directory
long include date and id in output
joiner
none
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

BEHAVIOR

This tag appears to be affected by, or affects, the following:
Global Variables: GPG_PATH

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

get-gpg-keys is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/UI_Tag/get_gpg_keys.coretag
Lines: 46


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: get_gpg_keys.coretag,v 1.5 2007-03-30 23:40:54 pajamian Exp $

UserTag get-gpg-keys Order    dir
UserTag get-gpg-keys addAttr
UserTag get-gpg-keys Version  $Revision: 1.5 $
UserTag get-gpg-keys Routine  <<EOR
sub {
my ($dir, $opt) = @_;
my $gpgexe = $Global::Variable->{GPG_PATH} || 'gpg';

my $flags = "--list-keys";
if($dir) {
$dir = filter_value('filesafe', $dir);
  $flags .= "--homedir $dir";
}
#::logDebug("gpg_get_keys flags=$flags");

open(GPGIMP, "$gpgexe $flags |") 
  or die "Can't fork: $!";

my $fmt = $opt->{long} ?  "%s=%s (date %s, id %s)" : "%s=%s";

my @out;
while(<GPGIMP>) {
  next unless s/^pub\s+//;
  my ($id, $date, $text) = split /\s+/, $_, 3;
  $id =~ s:.*?/::;
  $text = ::errmsg( $fmt, $id, $text, $date, $id );
  $text =~ s/</&lt;/g;
  $text =~ s/>/&gt;/g;
  $text =~ s/,/&#44;/g;
  push @out, $text;
}
close GPGIMP;
my $joiner = $opt->{joiner} || ",\n";
unshift @out, "=none" if $opt->{none};
return join($joiner, @out);
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!