community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1698205 - /comdev/reporter.apache.org/trunk/reportingcycles.py
Date Thu, 27 Aug 2015 18:21:52 GMT
Author: sebb
Date: Thu Aug 27 18:21:52 2015
New Revision: 1698205

URL: http://svn.apache.org/r1698205
Log:
Initial checkin - needs work before it can be used

Added:
    comdev/reporter.apache.org/trunk/reportingcycles.py   (with props)

Added: comdev/reporter.apache.org/trunk/reportingcycles.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/reportingcycles.py?rev=1698205&view=auto
==============================================================================
--- comdev/reporter.apache.org/trunk/reportingcycles.py (added)
+++ comdev/reporter.apache.org/trunk/reportingcycles.py Thu Aug 27 18:21:52 2015
@@ -0,0 +1,40 @@
+# Parse committee-info.json to generate reportingcycles.json
+# TODO not yet ready for use
+
+import json
+import re
+
+input={}
+ci = "data/committee-info.json" # TODO may be URL
+
+output={}
+out="site/reportingcycles2.json" # TODO temp file name
+
+print("Reading %s" % ci)
+with open(ci, "r") as inp:
+    input = json.loads(inp.read())
+    inp.close()
+
+# extract just the data we need
+committees=input['committees']
+for project in sorted(committees):
+    pdata = committees[project]
+    if not pdata['pmc']: # "pmc:" false
+        print("%s - skipped, not a PMC" % project)
+        continue
+    print(project)
+    output[project]=[]
+    report = pdata['report']
+    # TODO may need to change this; report entry may be changed to array
+    # Next month may include comma-space
+    if re.match('^Next month:', report):
+            output[project].append(report)
+    else:
+        report=re.split(',\s*', pdata['report'])
+        for period in report:
+            output[project].append(period)
+
+print("Writing %s" % out)
+with open(out, "w") as out:
+    out.write(json.dumps(output, indent=1, sort_keys=True))
+    out.close()

Propchange: comdev/reporter.apache.org/trunk/reportingcycles.py
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message