community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1690417 - /comdev/projects.apache.org/scripts/cronjobs/countaccounts.py
Date Sat, 11 Jul 2015 23:22:48 GMT
Author: sebb
Date: Sat Jul 11 23:22:48 2015
New Revision: 1690417

URL: http://svn.apache.org/r1690417
Log:
Document script actions

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

Modified: comdev/projects.apache.org/scripts/cronjobs/countaccounts.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/countaccounts.py?rev=1690417&r1=1690416&r2=1690417&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/countaccounts.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/countaccounts.py Sat Jul 11 23:22:48 2015
@@ -1,5 +1,24 @@
 #!/usr/bin/env python
 
+"""
+Extracts data showing the number of accounts created each month.
+
+Updates:
+../../site/json/foundation/accounts-evolution.json
+
+using the output from
+ldapsearch -x -LLL -b ou=people,dc=apache,dc=org createTimestamp
+
+The output file consists of lines of the form:
+{
+"1999-02": 22,
+"1999-03": 0,
+}
+
+N.B. The script currently only updates the entry for the current month.
+
+"""
+
 import json;
 import re
 from datetime import datetime
@@ -24,6 +43,8 @@ while True:
     if not line or line == "":
         break
     line = line.decode('utf-8')
+    # Sample output:
+    # createTimestamp: 20150330152151Z
     m = re.search(r"createTimestamp: (\d\d\d\d\d\d)", line)
     if m:
         if m.group(1) == tym:



Mime
View raw message