The branch master has been updated
       via  6b16ee4c68fe6ce0d524a0c7e93f996ae421370d (commit)
       via  87fa67430066f7abb7f01f8e96ed8c9989717e7a (commit)
      from  1cd3086c6cf82454b34679bf073f0a3b5bf4c0dc (commit)


- Log -----------------------------------------------------------------
commit 6b16ee4c68fe6ce0d524a0c7e93f996ae421370d
Author: Rich Salz <rs...@openssl.org>
Date:   Sun Aug 27 09:02:21 2017 -0400

    Add finduser -1 and adduser -v flags

commit 87fa67430066f7abb7f01f8e96ed8c9989717e7a
Author: Rich Salz <rs...@openssl.org>
Date:   Tue Aug 8 11:34:51 2017 -0400

    Add link to blog postings

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

Summary of changes:
 license/approved   |  8 +++++++-
 license/finduser   | 28 +++++++++++++++++++++++-----
 license/index.html |  4 +++-
 3 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/license/approved b/license/approved
index c667a5e..6d84dab 100755
--- a/license/approved
+++ b/license/approved
@@ -5,6 +5,7 @@ Flags:
     -c text...  Comment to use
     -r          Reject not approve
     -h          This help
+    -v          List emails as processed
 
 Args is a list of email addresses.
 """
@@ -24,12 +25,15 @@ cursor = conn.cursor()
 # Parse JCL
 comment = 'From CLI';
 reply = 'y'
-opts, args = getopt.getopt(sys.argv[1:], "c:hr")
+verbose = 0
+opts, args = getopt.getopt(sys.argv[1:], "c:hrv")
 for o,a in opts:
     if o == '-c':
         comment = a
     elif o == '-r':
         reply = 'n'
+    elif o == '-v':
+        verbose = 1
     else:
         print __doc__
         raise SystemExit
@@ -44,3 +48,5 @@ for email in args:
     for uid in cursor:
         cursor.execute(update, (today, reply, comment, uid[0]))
         conn.commit()
+        if verbose:
+            print email, uid[0]
diff --git a/license/finduser b/license/finduser
index 217d552..cea3dc7 100755
--- a/license/finduser
+++ b/license/finduser
@@ -1,10 +1,16 @@
 #! /usr/bin/env python
-"""Arguments is a list of SQL paterns (will get wrapped in wildcards, %),
-display uid email and name
+"""finduser [flags] pattern...
+
+Flags:
+    -1   Print just email
+
+Arguments is a list of SQL paterns (will get wrapped in wildcards, %),
+by default display full information as CSV.
 """
 
 import mysql.connector
 import datetime, os, re, subprocess, sys, string, random
+import getopt
 
 dbconfig = {
         'user': 'licensereader',
@@ -15,15 +21,27 @@ conn = mysql.connector.connect(**dbconfig)
 cursor = conn.cursor()
 raw = open("request-approval.txt").read()
 
+single = 0
+opts, args = getopt.getopt(sys.argv[1:], "1")
+for o,a in opts:
+    if o == '-1':
+        single = 1
+    else:
+        print __doc__
+        raise SystemExit
+
 # Get dict of matching users
-for email in sys.argv[1:]:
+for email in args:
     q = ('SELECT users.uid,email,reply,name,count(log.uid) FROM users'
             ' LEFT JOIN log ON log.uid = users.uid'
-            ' WHERE email like %s GROUP BY email' );
+            ' WHERE email like %s GROUP BY email' )
     pat = '%' + email + '%'
     cursor.execute(q, (pat,))
     for row in cursor:
         uid,email,reply,name,count = row
         if reply == None:
             reply = '-'
-        print '%d, %s, %s, %d, "%s"' % (uid, email, reply, count, name)
+        if single:
+            print email
+        else:
+            print '%d, %s, %s, %d, "%s"' % (uid, email, reply, count, name)
diff --git a/license/index.html b/license/index.html
index 4b3aeb8..2335ddb 100644
--- a/license/index.html
+++ b/license/index.html
@@ -40,9 +40,11 @@
 
     <p>We are grateful to all the contributors who have contributed to
     OpenSSL and look forward to their help and support in this effort.
+    For some background information, please see our <a
+    href="https://www.openssl.org/blog/blog/categories/license/";>blog 
postings</a>
+    on this effort.
     </p>
 
-
     <p>
     <hr>
     <form action="cgi-bin/lookup.py" method="GET">
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to