EasyGnuPG

Ben McGinnes ben at adversary.org
Tue Mar 22 15:41:53 CET 2016


On Tue, Mar 22, 2016 at 11:20:40AM +0100, Dashamir Hoxha wrote:
> On Tue, Mar 22, 2016 at 9:56 AM, Bernhard Reiter <bernhard at intevation.de>
> wrote:
> >
> > Any cross plattform approach would work. Python has the advantage
> > that the source code can be changed by an editor an immedeately run
> > and that it works fairly well cross-plattform.
> >
> > What is even more important is that you should use the official API to
> > GnuPG which is Gpgme. https://wiki.gnupg.org/APIs
> 
> 
> This is an important point (using the API), because trying to use
> `gpg` in scripts is terribly difficult. I don't understand why `gpg`
> does not follow the unix philosophy of being easily used in scripts
> and cooperating easily with other commands.

> So, if there are some things to be improved on gpg, this is one of
> them: make it more scriptable. Alternatively, make a bash wrapper of
> Gpgme (which can be used on bash scripts).

You might try experimenting with gpgme-tool then, it's one of the
undocumented/self-documented extras which comes with GPGME.  It
provides a socket interface with which you can interact with portions
of the GPGME functions, including most of the most common functions.
You can also pipe its commands to it through a shell, so start with
something like this:

    echo help | gpgme-tool
 
Or this:

    echo help | gpgme-tool > gpgme-tool-cheatsheet.txt


Regards,
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 630 bytes
Desc: not available
URL: </pipermail/attachments/20160323/e47071c5/attachment.sig>


More information about the Gnupg-users mailing list