[Blends-commit] [SCM] website branch, master, updated. 651bc4bc76a8ade141a00fb65fd215719ff45cb2

Petter Reinholdtsen pere at hungry.com
Sat Feb 6 20:48:29 UTC 2016


The following commit has been merged in the master branch:
commit 8e665c081e00e8ab6fbe36926a09c8d41c8d0e3e
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat Feb 6 21:46:46 2016 +0100

    Add option parsing.

diff --git a/webtools/generate-debtags-field-list b/webtools/generate-debtags-field-list
index 37e2c69..6fcb77b 100755
--- a/webtools/generate-debtags-field-list
+++ b/webtools/generate-debtags-field-list
@@ -5,12 +5,17 @@
 
 from psycopg2 import connect
 from re import split, sub
+import optparse
 
-keytag = "use::learning"
+parser = optparse.OptionParser(version='0.0')
+(options, args) = parser.parse_args()
+
+keytag = args[0] or "use::gameplaying"
+grouptag = args[1] or "game"
 
 query = """
 SELECT package, tag from debtags
-  WHERE tag like 'field::%%'
+  WHERE tag like '%s::%%'
     AND package IN (SELECT package FROM debtags
                       WHERE tag = '%s'
                         AND package IN (SELECT package FROM debtags
@@ -18,7 +23,7 @@ SELECT package, tag from debtags
                                                package in (select package from debtags
                                                            where tag = 'interface::x11')))
   ORDER BY tag, package;
-""" % keytag
+""" % (grouptag, keytag)
 
 conn = connect(database='udd', port=5452, host='public-udd-mirror.xvm.mit.edu',
                user='public-udd-mirror', password='public-udd-mirror')

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list