incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1790519 - /incubator/public/trunk/devlists.py
Date Fri, 07 Apr 2017 08:33:36 GMT
Author: gstein
Date: Fri Apr  7 08:33:36 2017
New Revision: 1790519

URL: http://svn.apache.org/viewvc?rev=1790519&view=rev
Log:
Add script by John D. Ament, to print a list of all podlings'
developer lists.

This will be used by the Infra team to maintain podlings@

Added:
    incubator/public/trunk/devlists.py   (with props)

Added: incubator/public/trunk/devlists.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/devlists.py?rev=1790519&view=auto
==============================================================================
--- incubator/public/trunk/devlists.py (added)
+++ incubator/public/trunk/devlists.py Fri Apr  7 08:33:36 2017
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+ 
+# 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.
+ 
+"""
+Generates a list of podling dev mailing lists based on podlings.xml contents
+"""
+ 
+import sys
+if sys.version_info < (3, 2):
+    raise Exception("Python 3.2 or above is required")
+ 
+import xml.dom.minidom
+import urllib.request
+ 
+def processPodlings(xmlFile):
+    """
+    Parse a podlings.xml stream
+    """
+    dom = xml.dom.minidom.parse(xmlFile)
+    specials = ['wave','blur']
+    for row in dom.getElementsByTagName("podling"):
+        if row.getAttribute("status") != 'current':
+            continue
+        podling_id = row.getAttribute("name").strip()
+        podling_id = podling_id.lower().replace(' ', '')
+        if podling_id == 'odftoolkit':
+            print("odf-dev@incubator.apache.org")
+        elif podling_id in specials:
+            print("%s-dev@incubator.apache.org" % podling_id)
+        else:
+            print("dev@%s.incubator.apache.org" % podling_id)
+ 
+def main():
+    podlings_xml = urllib.request.urlopen('https://svn.apache.org/repos/asf/incubator/public/trunk/content/podlings.xml')
+    processPodlings(podlings_xml)
+ 
+if __name__ == '__main__':
+    main()

Propchange: incubator/public/trunk/devlists.py
------------------------------------------------------------------------------
    svn:executable = *



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message