incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r708077 - in /incubator/public/trunk: clutch.py site-author/clutch.xml site-publish/clutch.html
Date Mon, 27 Oct 2008 03:02:59 GMT
Author: crossley
Date: Sun Oct 26 20:02:59 2008
New Revision: 708077

URL: http://svn.apache.org/viewvc?rev=708077&view=rev
Log:
Gather some url info details from their status page.
Improve detection of podling website: First, try the url from their status page
then, try a standard url.

Modified:
    incubator/public/trunk/clutch.py
    incubator/public/trunk/site-author/clutch.xml
    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=708077&r1=708076&r2=708077&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Sun Oct 26 20:02:59 2008
@@ -129,7 +129,9 @@
     projects[id]['statusLastUpdated'] = ""
     projects[id]['statusAge'] = 0
     projects[id]['statusUpdateCounts'] = ""
-    projects[id]['url'] = ""
+    projects[id]['urlSvn'] = ""
+    projects[id]['urlTracker'] = ""
+    projects[id]['urlWww'] = ""
     projects[id]['dist'] = ""
     projects[id]['hasEntryIssues'] = False
     projects[id]['description'] = ""
@@ -222,13 +224,24 @@
         {'name1': projects[k]['name'], 'name2': projectsTable[k]['name']}
   statusFile = "site-author/projects/%s.xml" % projectsTable[k]['statusFileName']
   dom = xml.dom.minidom.parse(statusFile)
+  # get the project info hints
   table = dom.getElementsByTagName("table")[0]
   for row in table.getElementsByTagName("tr")[1:]:
     cell = row.getElementsByTagName("td")[2]
     if cell.attributes.has_key('id'):
       values = [getText(item.childNodes) for item in cell.childNodes]
-      value = "".join(values)
-      #print "%(a)s=%(b)s" % {'a': cell.getAttribute('id'), 'b': value.strip()}
+      value = "".join(values).strip()
+      #print "%(a)s=%(b)s" % {'a': cell.getAttribute('id'), 'b': value}
+      value = value.replace('https:', 'http:')
+      if cell.getAttribute('id') == "svn" and value.find('http:') == 0:
+        projects[k]['urlSvn'] = value
+        continue
+      if cell.getAttribute('id') == "tracker" and value.find('http:') == 0:
+        projects[k]['urlTracker'] = value
+        continue
+      if cell.getAttribute('id') == "www" and value.find('http:') == 0:
+        projects[k]['urlWww'] = value
+        continue
   dom.unlink()
 
 # end of processing incubation table data
@@ -401,14 +414,24 @@
     else:
       projects[k]['hasMailListCommits'] = True
 
-  # See if they have a website yet.
-  url = "http://incubator.apache.org/%s/" % projects[k]['statusFileName']
-  try:
-    urllib2.urlopen(url)
-  except IOError:
+  # Detect if they have a website yet.
+  # First, try the url from their status page
+  # then, try a standard url.
+  urlWwwDefault = "http://incubator.apache.org/%s/" % projects[k]['statusFileName']
+  if urlWwwDefault == projects[k]['urlWww']:
+    urlWwwDefault = ""
+  for url in [projects[k]['urlWww'], urlWwwDefault]:
+    if url == "":
+      continue
+    try:
+      urllib2.urlopen(url)
+    except IOError:
+      projects[k]['urlWww'] = ""
+    else:
+      projects[k]['urlWww'] = url
+      break
+  if not projects[k]['urlWww']:
     print 'INFO: %s: Does not yet have a website' % k
-  else:
-    projects[k]['url'] = url
 
   # See if they have a distribution yet.
   # FIXME: Probably need to instead get info from roberts's "audit" data.
@@ -676,9 +699,9 @@
   else:
     fileXml.write('          <td>False</td>\n')
 
-  if projects[k]['url']:
+  if projects[k]['urlWww']:
     fileXml.write('          <td class="cool1"><a href="%s">True</a></td>\n'
% \
-        projects[k]['url'])
+        projects[k]['urlWww'])
   else:
     fileXml.write('          <td>False</td>\n')
 

Modified: incubator/public/trunk/site-author/clutch.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/site-author/clutch.xml?rev=708077&r1=708076&r2=708077&view=diff
==============================================================================
--- incubator/public/trunk/site-author/clutch.xml (original)
+++ incubator/public/trunk/site-author/clutch.xml Sun Oct 26 20:02:59 2008
@@ -91,7 +91,7 @@
         </li>
       </ul>
       <p>
-        Clutch last gathered: Mon Oct 27 00:42:34 2008 UTC.<br />
+        Clutch last gathered: Mon Oct 27 02:54:19 2008 UTC.<br />
         Number of podlings in incubation: 35
       </p>
       <table id="clutch">
@@ -722,7 +722,7 @@
           <td class="cool1"><a href="http://people.apache.org/~jim/projects.html#portals-wsrp4j">15</a></td>
           <td>False</td>
           <td>False</td>
-          <td>False</td>
+          <td class="cool1"><a href="http://portals.apache.org/wsrp4j/">True</a></td>
           <td>False</td>
         </tr>
         <tr>

Modified: incubator/public/trunk/site-publish/clutch.html
URL: http://svn.apache.org/viewvc/incubator/public/trunk/site-publish/clutch.html?rev=708077&r1=708076&r2=708077&view=diff
==============================================================================
--- incubator/public/trunk/site-publish/clutch.html (original)
+++ incubator/public/trunk/site-publish/clutch.html Sun Oct 26 20:02:59 2008
@@ -180,7 +180,7 @@
         </li>
       </ul>
 <p>
-        Clutch last gathered: Mon Oct 27 00:42:34 2008 UTC.<br />
+        Clutch last gathered: Mon Oct 27 02:54:19 2008 UTC.<br />
         Number of podlings in incubation: 35
       </p>
 <table id="clutch" class="colortable" width="100%">
@@ -811,7 +811,7 @@
           <td class="cool1"><a href="http://people.apache.org/~jim/projects.html#portals-wsrp4j">15</a></td>
           <td>False</td>
           <td>False</td>
-          <td>False</td>
+          <td class="cool1"><a href="http://portals.apache.org/wsrp4j/">True</a></td>
           <td>False</td>
         </tr>
         <tr>



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


Mime
View raw message