incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r1186677 - in /incubator/public/trunk: clutch.py site-publish/clutch.html
Date Thu, 20 Oct 2011 09:05:56 GMT
Author: crossley
Date: Thu Oct 20 09:05:56 2011
New Revision: 1186677

URL: http://svn.apache.org/viewvc?rev=1186677&view=rev
Log:
Clutch now generates the data file for history/entry.txt

Modified:
    incubator/public/trunk/clutch.py
    incubator/public/trunk/site-publish/clutch.html

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1186677&r1=1186676&r2=1186677&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Thu Oct 20 09:05:56 2011
@@ -254,24 +254,24 @@ def getText(nodelist):
 dom = xml.dom.minidom.parse("site-author/podlings.xml")
 
 graduatedProjects = {}
+history = {}
 
 print("Gather data from podlings.xml ...")
 for row in dom.getElementsByTagName("podling"):
+ name = row.getAttribute("name").strip()
+ id = name.lower()
+ id = id.replace(' ', '') # strip spaces from project ID
+ # handle some inconsistent names
+ # FIXME: perhaps need to use resourceNames
+ if 'manifoldcf' in id:
+   id = 'manifoldcf'
+ startDate = row.getAttribute("startdate")
  if row.getAttribute("status") == 'graduated':
   resource = row.getAttribute("resource")
   graduatedProjects[resource.lower()] = True
  if row.getAttribute("status") == 'current':
-  name = row.getAttribute("name")
-  fileBaseName = row.getAttribute("resource")
-  name = name.strip() # strip whitespace
-  id = name.lower()
   #print("Name: " + name)
-  id = id.replace(' ', '') # strip spaces from project ID
-  # handle some inconsistent names
-  # FIXME: perhaps need to use resourceNames
-  if 'manifoldcf' in id:
-    id = 'manifoldcf'
-  startDate = row.getAttribute("startdate")
+  fileBaseName = row.getAttribute("resource")
   sponsor = row.getAttribute("sponsor")
   description = getText(row.getElementsByTagName("description"))
   mentors = row.getElementsByTagName("mentor")[0].firstChild.data
@@ -302,6 +302,24 @@ for row in dom.getElementsByTagName("pod
           mentorsProjects[theMentor] += ", {0}".format(projectsTable[id]['name'])
   else:
     print("ERROR: {0}: row exists".format(id))
+ history[id] = {}
+ history[id]['name'] = name
+ match = re.search(startDateRE, startDate)
+ if match:
+   if match.group(3) != None:
+     entryDateDay = int(match.group(3))
+   else:
+     entryDateDay = 1
+   if match.group(2) != None:
+     entryDateMonth = int(match.group(2))
+   else:
+     entryDateMonth = 1
+   try:
+     entryDate = datetime.datetime(int(match.group(1)), entryDateMonth, entryDateDay)
+   except ValueError:
+     print("ERROR: {0}: ValueError with date".format(id))
+   else:
+     history[id]['startDate'] = entryDate
 
 dom.unlink()
 
@@ -1133,6 +1151,16 @@ fileReport3 = open('site-author/report_d
 fileReport3.write(reportList3)
 fileReport3.close()
 
+fileHistory = open('site-author/history/entry.txt', 'w')
+fileHistory.write('# podlings entered incubation\n')
+sequence = len(history) + 1
+# sorted by date
+for item in sorted(history.items(), key=lambda x:x[1]['startDate'], reverse=True):
+  sequence -= 1
+  startDate = item[1]['startDate'].strftime("%Y-%m-%d")
+  fileHistory.write('{0},"{1}",{2}\n'.format(startDate, item[1]['name'], sequence))
+fileHistory.close()
+
 # Create the persistent data file.
 outputFile = open('clutch.pkl', 'wb')
 pickle.dump(output, outputFile, pickle.HIGHEST_PROTOCOL)

Modified: incubator/public/trunk/site-publish/clutch.html
URL: http://svn.apache.org/viewvc/incubator/public/trunk/site-publish/clutch.html?rev=1186677&r1=1186676&r2=1186677&view=diff
==============================================================================
--- incubator/public/trunk/site-publish/clutch.html [utf-8] (original)
+++ incubator/public/trunk/site-publish/clutch.html [utf-8] Thu Oct 20 09:05:56 2011
@@ -225,7 +225,7 @@ href="http://wiki.apache.org/incubator">
 
       </ul>
 <p>
-        Clutch last gathered: Wed Oct 19 23:39:12 2011 UTC.<br />
+        Clutch last gathered: Thu Oct 20 08:56:52 2011 UTC.<br />
         Number of podlings in incubation: 60
 </p>
 <table id="clutch" class="colortable" width="100%">
@@ -261,9 +261,9 @@ href="http://wiki.apache.org/incubator">
           <td>group-3</td>
           <td class="cool1">True</td>
           <td class="cool1"><a href="projects/accumulo.html">True</a></td>
-          <td>2011-09-14</td>
+          <td>2011-10-20</td>
           <td />
-          <td>2,-,-</td>
+          <td>3,-,-</td>
           <td class="cool1 number"><a href="http://people.apache.org/committers-by-project.html#accumulo">7</a></td>
           <td class="care number">0</td>
           <td class="cool1"><a href="https://svn.apache.org/repos/asf/incubator/accumulo/">True</a></td>
@@ -330,9 +330,9 @@ href="http://wiki.apache.org/incubator">
           <td>group-2</td>
           <td class="cool1">True</td>
           <td class="cool1"><a href="projects/ambari.html">True</a></td>
-          <td>2011-09-23</td>
+          <td>2011-10-20</td>
           <td />
-          <td>7,-,-</td>
+          <td>8,-,-</td>
           <td class="cool1 number"><a href="http://people.apache.org/committers-by-project.html#ambari">9</a></td>
           <td class="care number">0</td>
           <td class="cool1"><a href="https://svn.apache.org/repos/asf/incubator/ambari/">True</a></td>
@@ -424,7 +424,7 @@ href="http://wiki.apache.org/incubator">
           <td class="cool1"><a href="projects/bigtop.html">True</a></td>
           <td>2011-08-25</td>
           <td />
-          <td>2,10,-</td>
+          <td>2,9,10</td>
           <td class="cool1 number"><a href="http://people.apache.org/committers-by-project.html#bigtop">17</a></td>
           <td class="care number">0</td>
           <td class="cool1"><a href="https://svn.apache.org/repos/asf/incubator/bigtop/">True</a></td>
@@ -677,7 +677,7 @@ href="http://wiki.apache.org/incubator">
           <td class="cool1"><a href="projects/etch.html">True</a></td>
           <td>2011-10-13</td>
           <td />
-          <td>3,5,5</td>
+          <td>2,5,5</td>
           <td class="cool1 number"><a href="http://people.apache.org/committers-by-project.html#etch">12</a></td>
           <td class="cool1 number">4</td>
           <td class="cool1"><a href="http://svn.apache.org/repos/asf/incubator/etch/">True</a></td>
@@ -1389,9 +1389,9 @@ href="http://wiki.apache.org/incubator">
           <td>group-3</td>
           <td class="cool1">True</td>
           <td class="cool1"><a href="projects/s4.html">True</a></td>
-          <td>2011-10-07</td>
+          <td>2011-10-20</td>
           <td />
-          <td>3,-,-</td>
+          <td>4,-,-</td>
           <td class="cool1 number"><a href="http://people.apache.org/committers-by-project.html#s4">8</a></td>
           <td class="care number">0</td>
           <td class="cool1"><a href="https://svn.apache.org/repos/asf/incubator/s4/">True</a></td>



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


Mime
View raw message