[git] GPGME - branch, ben/docs/2018-03, updated. gpgme-1.10.0-70-g172baaf

by Ben McGinnes cvs at cvs.gnupg.org
Fri Mar 9 10:47:23 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, ben/docs/2018-03 has been updated
       via  172baaf4d3e4ed03a4d3437be9efa3dfe6a847bc (commit)
       via  f2c1e8d8d54068a7f072efa178fc30460821eff3 (commit)
      from  01686463948ac6096dd8579a110c478d3a1f9a83 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 172baaf4d3e4ed03a4d3437be9efa3dfe6a847bc
Author: Ben McGinnes <ben at adversary.org>
Date:   Fri Mar 9 20:45:14 2018 +1100

    doc: python bindings HOWTO
    
    * Added instructions and code to count the number of public and secret
      keys available since it was quick and easy.

diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org
index 0b882b5..4385bc9 100644
--- a/lang/python/docs/GPGMEpythonHOWTOen.org
+++ b/lang/python/docs/GPGMEpythonHOWTOen.org
@@ -498,6 +498,39 @@
    #+end_src
 
 
+* Working with keys
+  :PROPERTIES:
+  :CUSTOM_ID: howto-keys
+  :END:
+
+** Counting keys
+   :PROPERTIES:
+   :CUSTOM_ID: howto-basic-verification
+   :END:
+
+   Counting the number of keys in your public keybox (=pubring.kbx=),
+   the format shich has superceded the old keyring format
+   (=pubring.gpg= and =secring.gpg=) is a very simple task.
+
+   #+begin_src python
+     import gpg
+
+     c = gpg.Context()
+     seckeys = c.keylist(pattern=None, secret=True)
+     pubkeys = c.keylist(pattern=None, secret=False)
+
+     seclist = list(seckeys)
+     secnum = len(seclist)
+
+     publist = list(pubkeys)
+     pubnum = len(publist)
+
+     print("""
+     Number of secret keys:  {0}
+     Number of public keys:  {1}
+     """.format(secnum, pubnum)
+   #+end_src
+
 * Copyright and Licensing
   :PROPERTIES:
   :CUSTOM_ID: copyright-and-license

commit f2c1e8d8d54068a7f072efa178fc30460821eff3
Author: Ben McGinnes <ben at adversary.org>
Date:   Fri Mar 9 20:44:02 2018 +1100

    doc: python TODO list
    
    * Slightly tweaked one heading to make it clear it wasn't a duplicate.

diff --git a/lang/python/docs/TODO.org b/lang/python/docs/TODO.org
index df1aa4e..21d2216 100644
--- a/lang/python/docs/TODO.org
+++ b/lang/python/docs/TODO.org
@@ -70,7 +70,7 @@
      Generating keys, adding subkeys, revoking subkeys (and keeping
      the cert key), adding and revoking UIDs, signing/certifying keys.
 
-**** TODO Key control
+**** TODO More key control
      :PROPERTIES:
      :CUSTOM_ID: howto-key-selection
      :END:

-----------------------------------------------------------------------

Summary of changes:
 lang/python/docs/GPGMEpythonHOWTOen.org | 33 +++++++++++++++++++++++++++++++++
 lang/python/docs/TODO.org               |  2 +-
 2 files changed, 34 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list