cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@apache.org
Subject [1/8] cloudstack-www git commit: Python script to generate pmc and commiter list
Date Tue, 29 Sep 2015 07:41:27 GMT
Repository: cloudstack-www
Updated Branches:
  refs/heads/asf-site f58ecf3fa -> 51c9ec29b


Python script to generate pmc and commiter list

Made a small tool to create pmc and committer list by parsing the JSON
files on projects.apache.org.
This is accessible by anyone and does not require any ASF privileges.

Usage: python makewholist.py

Only dependencies are json, urllib and sys, which should be included by
default on most systems.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-www/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-www/commit/44c02cc7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-www/tree/44c02cc7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-www/diff/44c02cc7

Branch: refs/heads/asf-site
Commit: 44c02cc7e6f2d9da53de7663cbfff15871d786d0
Parents: 67710b2
Author: Erik Weber <terbolous@gmail.com>
Authored: Thu Aug 27 09:12:01 2015 +0200
Committer: Erik Weber <terbolous@gmail.com>
Committed: Thu Aug 27 10:51:49 2015 +0200

----------------------------------------------------------------------
 makewholist.py | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-www/blob/44c02cc7/makewholist.py
----------------------------------------------------------------------
diff --git a/makewholist.py b/makewholist.py
new file mode 100644
index 0000000..27e4e56
--- /dev/null
+++ b/makewholist.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""This module can be used to parse and print the PMC and Committer info
+of Apache CloudStack and potentially other ASF projects.
+
+Can be used at command line by running: python makewholist.py"""
+
+import json
+import sys
+import urllib
+
+GROUPS_URL = "https://projects.apache.org/json/foundation/groups.json"
+NAMES_URL = "https://projects.apache.org/json/foundation/people_name.json"
+
+names = {}   # Placeholder for names parsed in getNames()
+groups = {}  # Placeholder for groups parsed in getCommittersAndPMC()
+
+
+def getCommittersAndPMC():
+    """Get Committer and PMC info from ASF"""
+    global groups
+    try:
+        response = urllib.urlopen(GROUPS_URL)
+        groups = json.loads(response.read())
+    except Exception, ex:
+        print "Error during groups JSON download or parsing: %s" % ex.message
+
+
+def getNames():
+    """ Get committer names info from ASF"""
+    global names
+    try:
+        response = urllib.urlopen(NAMES_URL)
+        names = json.loads(response.read())
+    except Exception, ex:
+        print "Error during names JSON download or parsing: %s" % ex.message
+
+
+def printWhoList():
+    if len(names) == 0 or len(groups) == 0:
+        print "Names or groups not initialized, aborting"
+        sys.exit(1)
+
+    print ("Active Project Management Committee contains "
+           "(in alphabetical order of their usernames):")
+
+    print "| Username | Name |"
+    print "|----------|------|"
+    for pmc in groups['cloudstack-pmc']:
+        print "|%s|%s|" % (pmc, names[pmc])
+    print ""
+    print ""
+    print ("Active list of committers "
+           "(in alphabetical order of their usernames):")
+    print "| Username | Name |"
+    print "|----------|------|"
+    for committer in groups['cloudstack']:
+        print "|%s|%s|" % (committer, names[committer])
+
+
+if __name__ == "__main__":
+    getNames()
+    getCommittersAndPMC()
+    printWhoList()


Mime
View raw message