community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1714022 - /comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
Date Thu, 12 Nov 2015 11:50:30 GMT
Author: sebb
Date: Thu Nov 12 11:50:30 2015
New Revision: 1714022

URL: http://svn.apache.org/viewvc?rev=1714022&view=rev
Log:
Copy the charter to committees.json

Modified:
    comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py

Modified: comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py?rev=1714022&r1=1714021&r2=1714022&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py Thu Nov 12 11:50:30
2015
@@ -49,6 +49,9 @@ homepages = {
     'whimsy': 'http://whimsical.apache.org/', # incorrect in index.html because actual site
does not yet exist
 }
 
+# compress a string: trim it and replace multiple whitespace with a single space
+def compress(s):
+    return re.sub(r"""\s+""", ' ', s.strip())
 
 # Delete a path using SVN
 def svndel(path):
@@ -198,6 +201,10 @@ for group in sorted(committees, key=keyo
             else:
                 print("WARN: %s (%s) missing from /data/committees.xml" % (fullName, committeeId))
 
+            if committeeId in pmcs:
+                if 'charter' in pmcs[committeeId]:
+                    committee['charter'] = compress(pmcs[committeeId]['charter'])
+
             committeesList.append(committee)
             committeesMap[committeeId] = committee;
         else:



Mime
View raw message