community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1682996 [1/8] - in /comdev/projects.apache.org: scripts/import/ site/js/ site/json/foundation/ site/json/projects/
Date Mon, 01 Jun 2015 20:41:37 GMT
Author: hboutemy
Date: Mon Jun  1 20:41:35 2015
New Revision: 1682996

URL: http://svn.apache.org/r1682996
Log:
fixed rdf 2 json parsing: now every information from doap remains in json

Modified:
    comdev/projects.apache.org/scripts/import/rdfparse.py
    comdev/projects.apache.org/site/js/projects.js
    comdev/projects.apache.org/site/json/foundation/projects.json
    comdev/projects.apache.org/site/json/projects/abdera.json
    comdev/projects.apache.org/site/json/projects/accumulo.json
    comdev/projects.apache.org/site/json/projects/ace.json
    comdev/projects.apache.org/site/json/projects/activemq.json
    comdev/projects.apache.org/site/json/projects/airavata.json
    comdev/projects.apache.org/site/json/projects/ambari.json
    comdev/projects.apache.org/site/json/projects/ant-antunit.json
    comdev/projects.apache.org/site/json/projects/ant-compress.json
    comdev/projects.apache.org/site/json/projects/ant-dotnet.json
    comdev/projects.apache.org/site/json/projects/ant-ivy.json
    comdev/projects.apache.org/site/json/projects/ant-ivyde.json
    comdev/projects.apache.org/site/json/projects/ant-proper.html.json
    comdev/projects.apache.org/site/json/projects/ant-props.json
    comdev/projects.apache.org/site/json/projects/ant.json
    comdev/projects.apache.org/site/json/projects/any23.json
    comdev/projects.apache.org/site/json/projects/apr.json
    comdev/projects.apache.org/site/json/projects/archiva.json
    comdev/projects.apache.org/site/json/projects/aries.json
    comdev/projects.apache.org/site/json/projects/avro.json
    comdev/projects.apache.org/site/json/projects/axis-core.json
    comdev/projects.apache.org/site/json/projects/axis-sandesha.json
    comdev/projects.apache.org/site/json/projects/beehive.json
    comdev/projects.apache.org/site/json/projects/bigtop.json
    comdev/projects.apache.org/site/json/projects/bloodhound.json
    comdev/projects.apache.org/site/json/projects/bookkeeper.json
    comdev/projects.apache.org/site/json/projects/buildr.json
    comdev/projects.apache.org/site/json/projects/bval.json
    comdev/projects.apache.org/site/json/projects/camel.json
    comdev/projects.apache.org/site/json/projects/cassandra.json
    comdev/projects.apache.org/site/json/projects/cayenne.json
    comdev/projects.apache.org/site/json/projects/celix.json
    comdev/projects.apache.org/site/json/projects/chemistry.json
    comdev/projects.apache.org/site/json/projects/chukwa.json
    comdev/projects.apache.org/site/json/projects/clerezza.json
    comdev/projects.apache.org/site/json/projects/climate.json
    comdev/projects.apache.org/site/json/projects/cloudstack.json
    comdev/projects.apache.org/site/json/projects/cocoon.json
    comdev/projects.apache.org/site/json/projects/commons-bcel.json
    comdev/projects.apache.org/site/json/projects/commons-bsf.json
    comdev/projects.apache.org/site/json/projects/commons-chain.json
    comdev/projects.apache.org/site/json/projects/commons-cli.json
    comdev/projects.apache.org/site/json/projects/commons-codec.json
    comdev/projects.apache.org/site/json/projects/commons-collections.json
    comdev/projects.apache.org/site/json/projects/commons-compress.json
    comdev/projects.apache.org/site/json/projects/commons-configuration.json
    comdev/projects.apache.org/site/json/projects/commons-daemon.json
    comdev/projects.apache.org/site/json/projects/commons-dbcp.json
    comdev/projects.apache.org/site/json/projects/commons-dbutils.json
    comdev/projects.apache.org/site/json/projects/commons-digester.json
    comdev/projects.apache.org/site/json/projects/commons-discovery.json
    comdev/projects.apache.org/site/json/projects/commons-el.json
    comdev/projects.apache.org/site/json/projects/commons-email.json
    comdev/projects.apache.org/site/json/projects/commons-exec.json
    comdev/projects.apache.org/site/json/projects/commons-fileupload.json
    comdev/projects.apache.org/site/json/projects/commons-functor.json
    comdev/projects.apache.org/site/json/projects/commons-index.html.json
    comdev/projects.apache.org/site/json/projects/commons-io.json
    comdev/projects.apache.org/site/json/projects/commons-jci.json
    comdev/projects.apache.org/site/json/projects/commons-jcs.json
    comdev/projects.apache.org/site/json/projects/commons-jelly.json
    comdev/projects.apache.org/site/json/projects/commons-jexl.json
    comdev/projects.apache.org/site/json/projects/commons-jxpath.json
    comdev/projects.apache.org/site/json/projects/commons-lang.json
    comdev/projects.apache.org/site/json/projects/commons-launcher.json
    comdev/projects.apache.org/site/json/projects/commons-logging.json
    comdev/projects.apache.org/site/json/projects/commons-math.json
    comdev/projects.apache.org/site/json/projects/commons-modeler.json
    comdev/projects.apache.org/site/json/projects/commons-net.json
    comdev/projects.apache.org/site/json/projects/commons-ognl.json
    comdev/projects.apache.org/site/json/projects/commons-pool.json
    comdev/projects.apache.org/site/json/projects/commons-primitives.json
    comdev/projects.apache.org/site/json/projects/commons-proxy.json
    comdev/projects.apache.org/site/json/projects/commons-scxml.json
    comdev/projects.apache.org/site/json/projects/commons-validator.json
    comdev/projects.apache.org/site/json/projects/commons-vfs.json
    comdev/projects.apache.org/site/json/projects/commons-weaver.json
    comdev/projects.apache.org/site/json/projects/continuum.json
    comdev/projects.apache.org/site/json/projects/cordova.json
    comdev/projects.apache.org/site/json/projects/couchdb.json
    comdev/projects.apache.org/site/json/projects/creadur-rat.json
    comdev/projects.apache.org/site/json/projects/creadur-tentacles.json
    comdev/projects.apache.org/site/json/projects/creadur-whisker.json
    comdev/projects.apache.org/site/json/projects/crunch.json
    comdev/projects.apache.org/site/json/projects/ctakes.json
    comdev/projects.apache.org/site/json/projects/curator.json
    comdev/projects.apache.org/site/json/projects/cxf.json
    comdev/projects.apache.org/site/json/projects/datafu.json
    comdev/projects.apache.org/site/json/projects/db-derby.json
    comdev/projects.apache.org/site/json/projects/db-torque.json
    comdev/projects.apache.org/site/json/projects/deltacloud.json
    comdev/projects.apache.org/site/json/projects/deltaspike.json
    comdev/projects.apache.org/site/json/projects/devicemap.json
    comdev/projects.apache.org/site/json/projects/directmemory.json
    comdev/projects.apache.org/site/json/projects/directory-1.5.json
    comdev/projects.apache.org/site/json/projects/directory-studio.json
    comdev/projects.apache.org/site/json/projects/directory.json
    comdev/projects.apache.org/site/json/projects/drill.json
    comdev/projects.apache.org/site/json/projects/empire-db.json
    comdev/projects.apache.org/site/json/projects/esme.json
    comdev/projects.apache.org/site/json/projects/etch.json
    comdev/projects.apache.org/site/json/projects/excalibur.json
    comdev/projects.apache.org/site/json/projects/falcon.json
    comdev/projects.apache.org/site/json/projects/felix.json
    comdev/projects.apache.org/site/json/projects/flex.json
    comdev/projects.apache.org/site/json/projects/flink.json
    comdev/projects.apache.org/site/json/projects/flume.json
    comdev/projects.apache.org/site/json/projects/forrest.json
    comdev/projects.apache.org/site/json/projects/geronimo.json
    comdev/projects.apache.org/site/json/projects/giraph.json
    comdev/projects.apache.org/site/json/projects/gora.json
    comdev/projects.apache.org/site/json/projects/gump.json
    comdev/projects.apache.org/site/json/projects/hadoop.json
    comdev/projects.apache.org/site/json/projects/hama.json
    comdev/projects.apache.org/site/json/projects/harmony.json
    comdev/projects.apache.org/site/json/projects/hbase.json
    comdev/projects.apache.org/site/json/projects/helix.json
    comdev/projects.apache.org/site/json/projects/hive.json
    comdev/projects.apache.org/site/json/projects/httpcomponents-client.json
    comdev/projects.apache.org/site/json/projects/httpcomponents-core.json
    comdev/projects.apache.org/site/json/projects/httpcomponents-httpclient-3.x.json
    comdev/projects.apache.org/site/json/projects/httpd-mod_ftp.json
    comdev/projects.apache.org/site/json/projects/httpd.json
    comdev/projects.apache.org/site/json/projects/incubator-droids.json
    comdev/projects.apache.org/site/json/projects/isis.json
    comdev/projects.apache.org/site/json/projects/jackrabbit.json
    comdev/projects.apache.org/site/json/projects/jakarta-cactus.json
    comdev/projects.apache.org/site/json/projects/jakarta-ecs.json
    comdev/projects.apache.org/site/json/projects/jakarta-oro.json
    comdev/projects.apache.org/site/json/projects/jakarta-regexp.json
    comdev/projects.apache.org/site/json/projects/james.json
    comdev/projects.apache.org/site/json/projects/jclouds.json
    comdev/projects.apache.org/site/json/projects/jena.json
    comdev/projects.apache.org/site/json/projects/jmeter-index.html.json
    comdev/projects.apache.org/site/json/projects/jspwiki.json
    comdev/projects.apache.org/site/json/projects/juddi-scout.json
    comdev/projects.apache.org/site/json/projects/kafka.json
    comdev/projects.apache.org/site/json/projects/karaf.json
    comdev/projects.apache.org/site/json/projects/knox.json
    comdev/projects.apache.org/site/json/projects/lenya.json
    comdev/projects.apache.org/site/json/projects/libcloud.json
    comdev/projects.apache.org/site/json/projects/logging-chainsaw.html.json
    comdev/projects.apache.org/site/json/projects/logging-log4cxx.json
    comdev/projects.apache.org/site/json/projects/logging-log4j.json
    comdev/projects.apache.org/site/json/projects/logging-log4net.json
    comdev/projects.apache.org/site/json/projects/logging-log4php.json
    comdev/projects.apache.org/site/json/projects/lucene-core.json
    comdev/projects.apache.org/site/json/projects/lucene-solr.json
    comdev/projects.apache.org/site/json/projects/lucenenet.json
    comdev/projects.apache.org/site/json/projects/lucy.json
    comdev/projects.apache.org/site/json/projects/mahout.json
    comdev/projects.apache.org/site/json/projects/manifoldcf.json
    comdev/projects.apache.org/site/json/projects/marmotta.json
    comdev/projects.apache.org/site/json/projects/maven.json
    comdev/projects.apache.org/site/json/projects/mesos.json
    comdev/projects.apache.org/site/json/projects/metamodel.json
    comdev/projects.apache.org/site/json/projects/mina-ftpserver.json
    comdev/projects.apache.org/site/json/projects/mina-sshd.json
    comdev/projects.apache.org/site/json/projects/mina-vysper.json
    comdev/projects.apache.org/site/json/projects/mina.json
    comdev/projects.apache.org/site/json/projects/mrunit.json
    comdev/projects.apache.org/site/json/projects/myfaces-tobago.json
    comdev/projects.apache.org/site/json/projects/myfaces.json
    comdev/projects.apache.org/site/json/projects/nutch.json
    comdev/projects.apache.org/site/json/projects/ode.json
    comdev/projects.apache.org/site/json/projects/ofbiz.json
    comdev/projects.apache.org/site/json/projects/olingo.json
    comdev/projects.apache.org/site/json/projects/onami.json
    comdev/projects.apache.org/site/json/projects/oodt.json
    comdev/projects.apache.org/site/json/projects/oozie.json
    comdev/projects.apache.org/site/json/projects/openjpa.json
    comdev/projects.apache.org/site/json/projects/openmeetings.json
    comdev/projects.apache.org/site/json/projects/opennlp.json
    comdev/projects.apache.org/site/json/projects/openoffice.json
    comdev/projects.apache.org/site/json/projects/openwebbeans.json
    comdev/projects.apache.org/site/json/projects/orc.json
    comdev/projects.apache.org/site/json/projects/parquet.json
    comdev/projects.apache.org/site/json/projects/pdfbox.json
    comdev/projects.apache.org/site/json/projects/perl.json
    comdev/projects.apache.org/site/json/projects/phoenix.json
    comdev/projects.apache.org/site/json/projects/pig.json
    comdev/projects.apache.org/site/json/projects/pivot.json
    comdev/projects.apache.org/site/json/projects/poi.json
    comdev/projects.apache.org/site/json/projects/portals.json
    comdev/projects.apache.org/site/json/projects/qpid.json
    comdev/projects.apache.org/site/json/projects/rave.json
    comdev/projects.apache.org/site/json/projects/river.json
    comdev/projects.apache.org/site/json/projects/roller.json
    comdev/projects.apache.org/site/json/projects/samza.json
    comdev/projects.apache.org/site/json/projects/santuario.json
    comdev/projects.apache.org/site/json/projects/servicemix.json
    comdev/projects.apache.org/site/json/projects/shale.json
    comdev/projects.apache.org/site/json/projects/shindig.json
    comdev/projects.apache.org/site/json/projects/shiro.json
    comdev/projects.apache.org/site/json/projects/sis.json
    comdev/projects.apache.org/site/json/projects/sling.json
    comdev/projects.apache.org/site/json/projects/spamassassin.json
    comdev/projects.apache.org/site/json/projects/sqoop.json
    comdev/projects.apache.org/site/json/projects/stanbol.json
    comdev/projects.apache.org/site/json/projects/steve.json
    comdev/projects.apache.org/site/json/projects/storm.json
    comdev/projects.apache.org/site/json/projects/stratos.json
    comdev/projects.apache.org/site/json/projects/subversion.json
    comdev/projects.apache.org/site/json/projects/synapse.json
    comdev/projects.apache.org/site/json/projects/syncope.json
    comdev/projects.apache.org/site/json/projects/tajo.json
    comdev/projects.apache.org/site/json/projects/tapestry.json
    comdev/projects.apache.org/site/json/projects/taverna.json
    comdev/projects.apache.org/site/json/projects/tcl-rivet.json
    comdev/projects.apache.org/site/json/projects/tcl-websh.json
    comdev/projects.apache.org/site/json/projects/tez.json
    comdev/projects.apache.org/site/json/projects/thrift.json
    comdev/projects.apache.org/site/json/projects/tika.json
    comdev/projects.apache.org/site/json/projects/tiles.json
    comdev/projects.apache.org/site/json/projects/tomcat-rdc.json
    comdev/projects.apache.org/site/json/projects/tomcat.json
    comdev/projects.apache.org/site/json/projects/tomee.json
    comdev/projects.apache.org/site/json/projects/trafficserver.json
    comdev/projects.apache.org/site/json/projects/turbine.json
    comdev/projects.apache.org/site/json/projects/tuscany.json
    comdev/projects.apache.org/site/json/projects/uima.json
    comdev/projects.apache.org/site/json/projects/vcl.json
    comdev/projects.apache.org/site/json/projects/velocity-anakia.json
    comdev/projects.apache.org/site/json/projects/velocity-devel.json
    comdev/projects.apache.org/site/json/projects/velocity-texen.json
    comdev/projects.apache.org/site/json/projects/velocity-tools.json
    comdev/projects.apache.org/site/json/projects/velocity.json
    comdev/projects.apache.org/site/json/projects/vxquery.json
    comdev/projects.apache.org/site/json/projects/webservices-axiom.json
    comdev/projects.apache.org/site/json/projects/webservices-woden.json
    comdev/projects.apache.org/site/json/projects/whirr.json
    comdev/projects.apache.org/site/json/projects/wicket.json
    comdev/projects.apache.org/site/json/projects/wink.json
    comdev/projects.apache.org/site/json/projects/wookie.json
    comdev/projects.apache.org/site/json/projects/xalan-c.json
    comdev/projects.apache.org/site/json/projects/xalan-j.json
    comdev/projects.apache.org/site/json/projects/xerces-c.json
    comdev/projects.apache.org/site/json/projects/xerces-external.json
    comdev/projects.apache.org/site/json/projects/xerces-p.json
    comdev/projects.apache.org/site/json/projects/xerces-resolver.json
    comdev/projects.apache.org/site/json/projects/xerces-xerces2-j.json
    comdev/projects.apache.org/site/json/projects/xml-xindice.json
    comdev/projects.apache.org/site/json/projects/xmlbeans.json
    comdev/projects.apache.org/site/json/projects/xmlgraphics-batik.json
    comdev/projects.apache.org/site/json/projects/xmlgraphics-commons.json
    comdev/projects.apache.org/site/json/projects/xmlgraphics-fop.json
    comdev/projects.apache.org/site/json/projects/zest.json
    comdev/projects.apache.org/site/json/projects/zookeeper.json

Modified: comdev/projects.apache.org/scripts/import/rdfparse.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/rdfparse.py?rev=1682996&r1=1682995&r2=1682996&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/rdfparse.py (original)
+++ comdev/projects.apache.org/scripts/import/rdfparse.py Mon Jun  1 20:41:35 2015
@@ -71,9 +71,14 @@ for s in itemlist :
                     pjson[k] = "%s, %s" % (pjson[k], v)
                 else:
                     for xk in v:
-                        pjson[k][xk] = v[xk]
+                        pjson[k].append(v[xk])
             else:
-                pjson[k] = v
+                if k not in ['release', 'implements', 'repository', 'developer', 'maintainer',
'member']:
+                    pjson[k] = v
+                else:
+                    pjson[k] = []
+                    for xk in v:
+                        pjson[k].append(v[xk])
 
         if pjson['homepage']:
             homepage = pjson['homepage']
@@ -104,16 +109,16 @@ for s in itemlist :
         if 'category' in pjson:
             pjson['category'] = pjson['category'].replace("http://projects.apache.org/category/",
"")
         if projectJsonFilename:
-            add = {}
-            for k in pjson:
-                if pjson[k] != None and type(pjson[k]) is not str:
-                    for e in pjson[k]:
-                        add[e] = pjson[k][e]
-                    pjson[k] = None
+            #add = {}
+            #for k in pjson:
+            #    if pjson[k] != None and type(pjson[k]) is not str:
+            #        for e in pjson[k]:
+            #            add[e] = pjson[k][e]
+            #        pjson[k] = None
 
             projects[projectJsonFilename] = pjson
-            for e in add:
-                pjson[e] = add[e]
+            #for e in add:
+            #    pjson[e] = add[e]
             print("Writing projects/%s.json..." % projectJsonFilename)
             with open ("../../site/json/projects/%s.json" % projectJsonFilename, "w") as
f:
                 f.write(json.dumps(pjson, sort_keys=True, indent=0))

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1682996&r1=1682995&r2=1682996&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Mon Jun  1 20:41:35 2015
@@ -41,22 +41,22 @@ includeJs("js/underscore-min.js");
 function GetAsyncJSON(theUrl, xstate, callback) {
     var xmlHttp = null;
     if (window.XMLHttpRequest) {
-	xmlHttp = new XMLHttpRequest();
+        xmlHttp = new XMLHttpRequest();
     } else {
-	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
     }
     xmlHttp.open("GET", theUrl, true);
     xmlHttp.send(null);
     xmlHttp.onreadystatechange = function(state) {
-	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 || xmlHttp.status == 404) {
-	    if (callback) {
-		if (xmlHttp.status == 404) {
-		    callback({}, xstate);
-		} else {
-		    callback(JSON.parse(xmlHttp.responseText), xstate);
-		}
-	    }
-	}
+        if (xmlHttp.readyState == 4 && xmlHttp.status == 200 || xmlHttp.status ==
404) {
+            if (callback) {
+                if (xmlHttp.status == 404) {
+                    callback({}, xstate);
+                } else {
+                    callback(JSON.parse(xmlHttp.responseText), xstate);
+                }
+            }
+        }
     }
 }
 
@@ -66,41 +66,41 @@ var fetchCount = 0;
 function GetAsyncJSONArray(urls, finalCallback) {
     var obj = document.getElementById('progress');
     if (fetchCount == 0 ) {
-	fetchCount = urls.length;
+        fetchCount = urls.length;
     }
 
     if (urls.length > 0) {
-	var a = urls.shift();
-	var URL = a[0];
+        var a = urls.shift();
+        var URL = a[0];
         var desc = a[1];
-	var cb = a[2];
-	var xmlHttp = null;
-	if (window.XMLHttpRequest) {
-	    xmlHttp = new XMLHttpRequest();
-	} else {
-	    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-	}
-
-	if (obj) { obj.innerHTML = "loading file #" + ( fetchCount - urls.length ) + " / " + fetchCount
+ "<br>" + desc }
-
-	xmlHttp.open("GET", URL, true);
-	xmlHttp.send(null);
-	xmlHttp.onreadystatechange = function(state) {
-	    if (xmlHttp.readyState == 4 && xmlHttp.status == 200 || xmlHttp.status == 404)
{
-		if (cb) {
-		    if (xmlHttp.status == 404) {
-			cb({});
-		    } else {
-			cb(JSON.parse(xmlHttp.responseText));
-		    }
-		}
-		GetAsyncJSONArray(urls, finalCallback);
-	    }
-	}
+        var cb = a[2];
+        var xmlHttp = null;
+        if (window.XMLHttpRequest) {
+            xmlHttp = new XMLHttpRequest();
+        } else {
+            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+        }
+
+        if (obj) { obj.innerHTML = "loading file #" + ( fetchCount - urls.length ) + " /
" + fetchCount + "<br>" + desc }
+
+        xmlHttp.open("GET", URL, true);
+        xmlHttp.send(null);
+        xmlHttp.onreadystatechange = function(state) {
+            if (xmlHttp.readyState == 4 && xmlHttp.status == 200 || xmlHttp.status
== 404) {
+                if (cb) {
+                    if (xmlHttp.status == 404) {
+                        cb({});
+                    } else {
+                        cb(JSON.parse(xmlHttp.responseText));
+                    }
+                }
+                GetAsyncJSONArray(urls, finalCallback);
+            }
+        }
     }
     else {
-	if (obj) { obj.innerHTML = "building page content..." }
-	finalCallback();
+        if (obj) { obj.innerHTML = "building page content..." }
+        finalCallback();
     }
 }
 
@@ -134,11 +134,11 @@ function makeSelect(name, arr, sarr) {
     var sel = document.createElement('select');
     sel.setAttribute("name", name)
     for (i in arr) {
-	var val = arr[i];
-	var opt = document.createElement('option')
-	opt.setAttribute("value", val)
-	opt.innerHTML = val
-	sel.appendChild(opt);
+        var val = arr[i];
+        var opt = document.createElement('option')
+        opt.setAttribute("value", val)
+        opt.innerHTML = val
+        sel.appendChild(opt);
     }
     return sel
 }
@@ -147,12 +147,12 @@ function postREST(json, oform) {
     var form = new FormData(oform)
     var xmlHttp = null;
     if (window.XMLHttpRequest) {
-	xmlHttp = new XMLHttpRequest();
+        xmlHttp = new XMLHttpRequest();
     } else {
-	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
     }
     for (i in json) {
-	form.append(i, json[i])
+        form.append(i, json[i])
     }
     xmlHttp.open("POST", "/edit/save.py", false);
     xmlHttp.send(form);
@@ -162,28 +162,28 @@ function editProject(json, project) {
     var obj = document.getElementById('contents');
     obj.innerHTML = "<a href='/edit/'><img src='/images/back.png' style='vertical-align:
middle; margin-right: 10px;'/><b>Back to project list...</b></a><br/><h1>Project
editor:</h1><p>Editing " + project + ".json:</p>"
     if (!json || !json.name) {
-	json = projects[project] ? projects[project] : json
-	json.name = json.name ? json.name : "Apache Foo";
+        json = projects[project] ? projects[project] : json
+        json.name = json.name ? json.name : "Apache Foo";
     }
     if (json.category) {
-	json.category = json.category.replace(/http:\/\/projects.apache.org\/category\//gi, "")
+        json.category = json.category.replace(/http:\/\/projects.apache.org\/category\//gi,
"")
     }
     var form = document.createElement('form')
     form.appendChild(input("hidden", "file", project))
     var keys = ['name','pmc','homepage','shortdesc','description','category','programming-language','mailing-list',
'download-page','bug-database','SVNRepository','GitRepository']
     for (i in keys) {
-	k = keys[i]
-	if (k == 'description') {
-	    var txt = document.createElement('textarea');
-	    txt.setAttribute("name", "description")
-	    txt.style.width = "600px"
-	    txt.style.height = "140px"
-	    txt.innerHTML =  json[k] ? json[k] : "";
-	    form.appendChild(addKeyVal(k, txt))
-	}
-	else {
-	    form.appendChild(addKeyVal(k, input("text", k, json[k] ? json[k] : "")))
-	}
+        k = keys[i]
+        if (k == 'description') {
+            var txt = document.createElement('textarea');
+            txt.setAttribute("name", "description")
+            txt.style.width = "600px"
+            txt.style.height = "140px"
+            txt.innerHTML =  json[k] ? json[k] : "";
+            form.appendChild(addKeyVal(k, txt))
+        }
+        else {
+            form.appendChild(addKeyVal(k, input("text", k, json[k] ? json[k] : "")))
+        }
     } 
     var but = input("button", "submit", "Save changes")
     but.setAttribute("onclick", "postREST({}, this.form); alert('Changes saved!');")
@@ -198,25 +198,25 @@ function buildEditor(uid) {
     var obj = document.getElementById('contents');
     obj.innerHTML = "<h1>Project editor:</h1><h3>Select a project to edit:</h3><p>Only
projects where you are in the sponsoring PMC can be edited</p>"
     for (i in projects) {
-	var p = i.split("-")[0];
-	if (projects[i].name.match(/incubating/i)) {
-	    p = 'incubator'
-	}
-	if (unixgroups[p+"-pmc"] && unixgroups[p+"-pmc"].indexOf(uid) >= 0) {
-	    obj.innerHTML += "<a href='javascript:void(0);' onclick='editProjectPreload(\"" +
i + "\");'>" + projects[i].name + "</a><br/>"
-	}
-	
+        var p = i.split("-")[0];
+        if (projects[i].name.match(/incubating/i)) {
+            p = 'incubator'
+        }
+        if (unixgroups[p+"-pmc"] && unixgroups[p+"-pmc"].indexOf(uid) >= 0) {
+            obj.innerHTML += "<a href='javascript:void(0);' onclick='editProjectPreload(\""
+ i + "\");'>" + projects[i].name + "</a><br/>"
+        }
+        
     }
     obj.innerHTML += "<hr/><h3>Or create a new project:</h3>"
     var form = document.createElement('form')
     var groups = []
     for (i in unixgroups) {
-	for (x in unixgroups[i]) { 
-	    if (unixgroups[i][x] == uid && i.match(/.+-pmc$/i)) {
-		groups.push(i.replace("-pmc",""))
-		break
-	    }
-	}
+        for (x in unixgroups[i]) { 
+            if (unixgroups[i][x] == uid && i.match(/.+-pmc$/i)) {
+                groups.push(i.replace("-pmc",""))
+                break
+            }
+        }
     }
     form.appendChild(addKeyVal("PMC", makeSelect("pmc", groups, [])));
     form.appendChild(addKeyVal("Sub-project (if any) (a-z,0-9 only)", input("text", "sub",
"")))
@@ -229,7 +229,7 @@ function buildEditor(uid) {
 function newProject(form) {
     filename = form.pmc.value
     if (form.sub.value.length > 0) {
-	filename += "-" + form.sub.value.toLowerCase().replace(/[^-a-z0-9]/g, "")
+        filename += "-" + form.sub.value.toLowerCase().replace(/[^-a-z0-9]/g, "")
     }
     editProject({'pmc': form.pmc.value, 'homepage': 'http://'+form.pmc.value+'.apache.org/'},
filename);
 }
@@ -273,7 +273,6 @@ function renderProjectPage(project, proj
     var unixgroup = projectId.split("-")[0];
     // special case: empire-db
     if (unixgroup == "empire") unixgroup = "empire-db";
-    if (unixgroup == "hc") unixgroup = "httpcomponents";
     if (project && project.pmc == "attic") {
         unixgroup = "attic";
     }
@@ -317,18 +316,18 @@ function renderProjectPage(project, proj
 
     // Categories
     if (project['category']) {
-	var arr = project['category'].split(/,\s*/);
-	var pls = "";
-	for (i in arr) {
-	    var cat = arr[i];
-	    pls += "<a href='projects.html?category#" + cat + "'>" + cat + "</a> &nbsp;
";
-	}
-	appendLiInnerHTML(ul, "<b>Category:</b> " + pls);
+        var arr = project['category'].split(/,\s*/);
+        var pls = "";
+        for (i in arr) {
+            var cat = arr[i];
+            pls += "<a href='projects.html?category#" + cat + "'>" + cat + "</a>
&nbsp; ";
+        }
+        appendLiInnerHTML(ul, "<b>Category:</b> " + pls);
     }
 
     // Website
     if (project.homepage) {
-	appendLiInnerHTML(ul, "<b>Website:</b> <a href='" + project.homepage + "'
target='_blank'>" + project.homepage + "</a>");
+        appendLiInnerHTML(ul, "<b>Website:</b> <a href='" + project.homepage
+ "' target='_blank'>" + project.homepage + "</a>");
     }
     if (isIncubating) {
         appendLiInnerHTML(ul, "<b>Project status:</b> <span class='ppodling'>Incubating</span>");
@@ -340,24 +339,36 @@ function renderProjectPage(project, proj
 
     // Committers
     if (isIncubating && unixgroups[unixgroup]) {
-	var commitl = [];
-	var commitgroup = unixgroups[unixgroup];
-	for (i in commitgroup) {
-	    commitl.push(linkCommitterIndex(commitgroup[i]));
-	}
-	appendLiInnerHTML(ul, "<b>Committers (" + commitgroup.length + "):</b> <blockquote>"
+ commitl.join(", &nbsp;") + "</blockqoute>");
+        var commitl = [];
+        var commitgroup = unixgroups[unixgroup];
+        for (i in commitgroup) {
+            commitl.push(linkCommitterIndex(commitgroup[i]));
+        }
+        appendLiInnerHTML(ul, "<b>Committers (" + commitgroup.length + "):</b>
<blockquote>" + commitl.join(", &nbsp;") + "</blockqoute>");
     }
 
     // doap/rdf
     if (project.doap) {
-	appendLiInnerHTML(ul, "<b>Project data file:</b> <a href='" + project.doap
+ "' target='_blank'>DOAP RDF Source</a>");
+        appendLiInnerHTML(ul, "<b>Project data file:</b> <a href='" + project.doap
+ "' target='_blank'>DOAP RDF Source</a>");
     } else {
         appendLiInnerHTML(ul, "<b>Project data file:</b> no <a href='https://projects.apache.org/create.html'>DOAP
file</a> available");
     }
     // maintainer
-    if (project.maintainer && project.maintainer.Person && project.maintainer.Person.mbox)
{
-        var mt = project.maintainer.Person.mbox;
-        appendLiInnerHTML(ul, "<b>Project data maintainer:</b> <a href='"
+ mt + "'>" + mt.substr(mt.indexOf(":") + 1) + "</a>");
+    if (project.maintainer) {
+        var mt;
+        var maintainers = "";
+        for (mt in project.maintainer) {
+            mt = project.maintainer[mt];
+            if (mt.mbox) {
+                var id = mt.mbox;
+                id = id.substr(id.indexOf(':') + 1);
+                id = id.substr(0, id.indexOf('@'));
+                maintainers += linkCommitterIndex(id) + "&nbsp; ";
+            } else {
+                maintainers += mt.name + "&nbsp; ";
+            }
+        }
+        appendLiInnerHTML(ul, "<b>Project data maintainer(s):</b> " + maintainers);
     }
 
     obj.appendChild(ul);
@@ -367,42 +378,49 @@ function renderProjectPage(project, proj
     ul = document.createElement('ul');
 
     if (project['programming-language']) {
-	pl = project['programming-language'];
-	var arr = pl.split(/,\s*/);
-	pls = "";
-	for (i in arr) {
-	    pls += "<a href='projects.html?language#" + arr[i] + "'>" + arr[i] + "</a>
&nbsp; ";
-	}
-	appendLiInnerHTML(ul, "<b>Programming language:</b> " + pls);
+        pl = project['programming-language'];
+        var arr = pl.split(/,\s*/);
+        pls = "";
+        for (i in arr) {
+            pls += "<a href='projects.html?language#" + arr[i] + "'>" + arr[i] + "</a>&nbsp;
";
+        }
+        appendLiInnerHTML(ul, "<b>Programming language:</b> " + pls);
     }
 
     if (project['bug-database']) {
-	var bd = project['bug-database'];
-	appendLiInnerHTML(ul, "<b>Bug-tracking:</b> <a href='" + bd + "'>" + bd
+ "</a>");
+        var bd = project['bug-database'];
+        appendLiInnerHTML(ul, "<b>Bug-tracking:</b> <a href='" + bd + "'>"
+ bd + "</a>");
     }
 
     if (project['mailing-list']) {
-	bd = project['mailing-list'];
-	var xbd = bd;
-	// email instead of link?
-	if (bd.match(/@/)) {
-	    xbd = "mailto:" + bd;
-	}
-	appendLiInnerHTML(ul, "<b>Mailing list(s):</b> <a href='" + xbd + "'>"
+ bd + "</a>");
+        bd = project['mailing-list'];
+        var xbd = bd;
+        // email instead of link?
+        if (bd.match(/@/)) {
+            xbd = "mailto:" + bd;
+        }
+        appendLiInnerHTML(ul, "<b>Mailing list(s):</b> <a href='" + xbd +
"'>" + bd + "</a>");
     }
 
     obj.appendChild(ul);
 
     // repositories
     appendElementWithInnerHTML(obj,'h4',"Repositories:");
-    ul = document.createElement('ul');
-    if (project.SVNRepository&& project.SVNRepository.length > 0) {
-	    appendLiInnerHTML(ul, "<b>Subversion:</b> <a target=*_blank' href='"
+ project.SVNRepository + "'>" + project.SVNRepository + "</a>");
-    }
-    if (project.GitRepository && project.GitRepository.length > 0) {
-	    appendLiInnerHTML(ul, "<b>Git:</b> <a target=*_blank' href='" + project.GitRepository
+ "'>" + project.GitRepository + "</a>");
+    if (project.repository) {
+        ul = document.createElement('ul');
+        var r;
+        for (r in project.repository) {
+            r = project.repository[r];
+            if (r.indexOf("svn") > 0) {
+                appendLiInnerHTML(ul, "<b>Subversion:</b> <a target=*_blank'
href='" + r + "'>" + r + "</a>");
+            } else if (r.indexOf("git") > 0) {
+                appendLiInnerHTML(ul, "<b>Git:</b> <a target=*_blank' href='"
+ r + "'>" + r + "</a>");
+            } else {
+                appendLiInnerHTML(ul, "<b>repository:</b> <a target=*_blank'
href='" + r + "'>" + r + "</a>");
+            }
+        }
+        obj.appendChild(ul);
     }
-    obj.appendChild(ul);
 }
 
 
@@ -864,49 +882,49 @@ function buildCommitteesList() {
 function buildProjectListAsTable(json) {
     var arr = [];
     for (p in projects) {
-	var project = projects[p];
-	
-	// Get name of PMC
-	var pmc = committees[project.pmc] ? committees[project.pmc].name : "Unknown";
-	
-	// Get project type
-	var type = "Sub-Project";
-	var shortp = p.split("-")[0];
-	if (unixgroups[shortp]) {
-	    type = "TLP";
-	    if ((!committeesByName[project.name] && committees[project.pmc]) || project.name.match(/incubating/i))
{
-		type = "Sub-project";
-	    }
-	} else {
-	    type = "Retired";
-	}
-	
-	if (project.podling || project.name.match(/incubating/i)) {
-	    type = "Podling";
-	    pmc = "Apache Incubator";
-	}
-	
-	// Programming language
-	var pl = project['programming-language'] ? project['programming-language'] : "Unknown";
-	
-	// Shove the result into a row
-	arr.push([ p, project.name, type, pmc, pl, project.category])
+        var project = projects[p];
+        
+        // Get name of PMC
+        var pmc = committees[project.pmc] ? committees[project.pmc].name : "Unknown";
+        
+        // Get project type
+        var type = "Sub-Project";
+        var shortp = p.split("-")[0];
+        if (unixgroups[shortp]) {
+            type = "TLP";
+            if ((!committeesByName[project.name] && committees[project.pmc]) || project.name.match(/incubating/i))
{
+                type = "Sub-project";
+            }
+        } else {
+            type = "Retired";
+        }
+        
+        if (project.podling || project.name.match(/incubating/i)) {
+            type = "Podling";
+            pmc = "Apache Incubator";
+        }
+        
+        // Programming language
+        var pl = project['programming-language'] ? project['programming-language'] : "Unknown";
+        
+        // Shove the result into a row
+        arr.push([ p, project.name, type, pmc, pl, project.category])
     }
     
     // Construct the data table
     $('#contents').html( '<table cellpadding="0" cellspacing="0" border="0" class="display"
id="projectlist"></table>' );
  
     $('#projectlist').dataTable( {
-	"data": arr,
-	"columns": [
-	    { "title": "ID", "visible": false },
-	    { "title": "Name" },
-	    { "title": "Type" },
-	    { "title": "PMC" },
-	    { "title": "Programming Language(s)" },
-	    { "title": "Category" }
-	],
-	"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull) {
+        "data": arr,
+        "columns": [
+            { "title": "ID", "visible": false },
+            { "title": "Name" },
+            { "title": "Type" },
+            { "title": "PMC" },
+            { "title": "Programming Language(s)" },
+            { "title": "Category" }
+        ],
+        "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull) {
                     jQuery(nRow).attr('id', aData[0]);
                     jQuery(nRow).css("cursor", "pointer");
                     return nRow;
@@ -953,11 +971,11 @@ function renderFrontPage() {
     
     var earr = [];
     for (i in evolution) {
-	if (i > 260) {
-	    break;
-	}
-	var evo = evolution[i];
-	earr.push([evo.month, evo.new, evo.graduated, evo.retired, evo.current]);
+        if (i > 260) {
+            break;
+        }
+        var evo = evolution[i];
+        earr.push([evo.month, evo.new, evo.graduated, evo.retired, evo.current]);
     }
     //narr.sort(function(a,b) { return (b[1] - a[1]) });
     var data = new google.visualization.DataTable();
@@ -969,14 +987,14 @@ function renderFrontPage() {
     data.addRows(earr.reverse());
     
     coptions = {
-	title: "Podling evolution",
-	isStacked: true,
-	height: 320,
-	width: 1160,
-	seriesType: "bars",
-	backgroundColor: 'transparent',
-	series: {3: {type: "line", targetAxisIndex: 1}},
-	vAxes:[
+        title: "Podling evolution",
+        isStacked: true,
+        height: 320,
+        width: 1160,
+        seriesType: "bars",
+        backgroundColor: 'transparent',
+        series: {3: {type: "line", targetAxisIndex: 1}},
+        vAxes:[
               {title: 'Change in states'},
               {title: 'Current number of podlings'}
               ]
@@ -1082,31 +1100,31 @@ function renderLanguageChart() {
     var lcount = {};
     for (var i in projects) {
         i = projects[i];
-	if (i['programming-language']) {
-	    var a = i['programming-language'].split(", ");
-	    for (var x in a) {
+        if (i['programming-language']) {
+            var a = i['programming-language'].split(", ");
+            for (var x in a) {
                 x = a[x];
-		if (lingos.indexOf(x) < 0) {
-		    lingos.push(x);
-		    lcount[x] = 0;
-		}
-		lcount[x]++;
-	    }
-	}
+                if (lingos.indexOf(x) < 0) {
+                    lingos.push(x);
+                    lcount[x] = 0;
+                }
+                lcount[x]++;
+            }
+        }
     }
     
     
     var narr = [];
     for (i in lingos) {
-	var lang = lingos[i];
-	narr.push([lang, lcount[lang], 'Click here to view all projects using ' + lang]);
+        var lang = lingos[i];
+        narr.push([lang, lcount[lang], 'Click here to view all projects using ' + lang]);
     }
     narr.sort(function(a,b) { return (b[1] - a[1]) });
     
     var data = new google.visualization.DataTable();
         data.addColumn('string', 'Language');
         data.addColumn('number', "Projects using it");
-	data.addColumn({type: 'string', role: 'tooltip'});
+        data.addColumn({type: 'string', role: 'tooltip'});
         data.addRows(narr);
 
     var options = {
@@ -1119,11 +1137,11 @@ function renderLanguageChart() {
     obj.appendChild(chartDiv);
     
     function selectHandlerLanguage() {
-	var selectedItem = chart.getSelection()[0];
-	if (selectedItem) {
-	  var value = data.getValue(selectedItem.row, 0);
-	  location.href = "projects.html?language#" + value;
-	}
+        var selectedItem = chart.getSelection()[0];
+        if (selectedItem) {
+          var value = data.getValue(selectedItem.row, 0);
+          location.href = "projects.html?language#" + value;
+        }
     }
     google.visualization.events.addListener(chart, 'select', selectHandlerLanguage);
     chart.draw(data, options);
@@ -1133,24 +1151,24 @@ function renderLanguageChart() {
     var cats = [];
     var ccount = {};
     for (i in projects) {
-	i = projects[i];
-	if (i.category) {
-	    var a = i.category.split(", ");
-	    for (x in a) {
-		if (cats.indexOf(a[x]) < 0) {
-		    cats.push(a[x]);
-		    ccount[a[x]] = 0;
-		}
-		ccount[a[x]]++;
-	    }
-	}
+        i = projects[i];
+        if (i.category) {
+            var a = i.category.split(", ");
+            for (x in a) {
+                if (cats.indexOf(a[x]) < 0) {
+                    cats.push(a[x]);
+                    ccount[a[x]] = 0;
+                }
+                ccount[a[x]]++;
+            }
+        }
     }
     
     
     var carr = [];
     for (i in cats) {
-	var cat = cats[i];
-	carr.push([cat, ccount[cat], 'Click here to view all projects in the ' + cat + ' category'])
+        var cat = cats[i];
+        carr.push([cat, ccount[cat], 'Click here to view all projects in the ' + cat + '
category'])
     }
     carr.sort(function(a,b) { return (b[1] - a[1]) });
     
@@ -1158,7 +1176,7 @@ function renderLanguageChart() {
     var data2 = new google.visualization.DataTable();
         data2.addColumn('string', 'Category');
         data2.addColumn('number', "Projects");
-	data2.addColumn({type: 'string', role: 'tooltip'});
+        data2.addColumn({type: 'string', role: 'tooltip'});
         data2.addRows(carr);
 
     var options = {
@@ -1173,11 +1191,11 @@ function renderLanguageChart() {
     
     
     function selectHandlerCategory() {
-	var selectedItem = chart2.getSelection()[0];
-	if (selectedItem) {
-	  var value = data2.getValue(selectedItem.row, 0);
-	  location.href = "projects.html?category#" + value;
-	}
+        var selectedItem = chart2.getSelection()[0];
+        if (selectedItem) {
+          var value = data2.getValue(selectedItem.row, 0);
+          location.href = "projects.html?category#" + value;
+        }
     }
     google.visualization.events.addListener(chart2, 'select', selectHandlerCategory);
     chart2.draw(data2, options);
@@ -1206,19 +1224,19 @@ function drawAccountCreation(json) {
     var max = 0;
     var jsort = [];
     for (j in json) {
-	jsort.push(j);
+        jsort.push(j);
     }
     
     jsort.sort();
     var c = 0;
     for (i in jsort) {
-	i = jsort[i];
-	var entry = json[i];
-	var arr = i.split("-");
-	var d = new Date(parseInt(arr[0]), parseInt(arr[1]), 1);
-	c += entry;
-	narr.push([i, entry, c]);
-	max = (max < entry) ? entry : max;
+        i = jsort[i];
+        var entry = json[i];
+        var arr = i.split("-");
+        var d = new Date(parseInt(arr[0]), parseInt(arr[1]), 1);
+        c += entry;
+        narr.push([i, entry, c]);
+        max = (max < entry) ? entry : max;
     }
     cdata.addRows(narr);
 
@@ -1234,10 +1252,10 @@ function drawAccountCreation(json) {
       
       ],
       series: {
-	1: {type: "line", pointSize:3, lineWidth: 3, targetAxisIndex: 1},
-	0: {type: "bars", targetAxisIndex: 0, maxValue: max*2}
-	},
-	seriesType: "bars",
+        1: {type: "line", pointSize:3, lineWidth: 3, targetAxisIndex: 1},
+        0: {type: "bars", targetAxisIndex: 0, maxValue: max*2}
+        },
+        seriesType: "bars",
       tooltip: {isHtml: true}
     };
 
@@ -1285,7 +1303,7 @@ function searchProjects(str) {
     obj.innerHTML = "<h2>Search results for '" + str + "' (" + hitssorted.length +
"):</h2>";
     hitssorted.sort(function(a,b) { return hits[b].length - hits[a].length });
     var ul = document.createElement('ul');
-	
+        
     for (h in hitssorted) {
         h = hitssorted;
         var project = hits[h];
@@ -1296,7 +1314,7 @@ function searchProjects(str) {
         appendLiInnerHTML(ul,html);
     }
     if (hitssorted.length == 0) {
-    	obj.innerHTML += "No search results found";
+            obj.innerHTML += "No search results found";
     }
     obj.appendChild(ul);
 }
@@ -1308,7 +1326,7 @@ function checkKeyPress(e, txt) {
     if (!e) e = window.event;
     var keyCode = e.keyCode || e.which;
     if (keyCode == '13'){
-	    searchProjects(txt.value);
+            searchProjects(txt.value);
     }
 }
 
@@ -1390,14 +1408,14 @@ function renderReleases(releases) {
     $('#contents').html( '<table cellpadding="0" cellspacing="0" border="0" class="display"
id="releases"></table>' );
  
     $('#releases').dataTable( {
-	"data": arr,
-	"columns": [
-	    { "title": "ID", "visible": false },
-	    { "title": "Name" },
-	    { "title": "Date" },
-	    { "title": "Release name" }
-	],
-	"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull) {
+        "data": arr,
+        "columns": [
+            { "title": "ID", "visible": false },
+            { "title": "Name" },
+            { "title": "Date" },
+            { "title": "Release name" }
+        ],
+        "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull) {
                     jQuery(nRow).attr('id', aData[0]);
                     jQuery(nRow).css("cursor", "pointer");
                     return nRow;
@@ -1429,5 +1447,5 @@ function preloadEverything(callback) {
         ["json/foundation/committees-retired.json", "retired committees", weaveInRetiredCommittees],
         ["json/foundation/podlings-evolution.json", "podlings evolution", function(json)
{ evolution = json; }]
         ],
-	callback);
+        callback);
 }



Mime
View raw message