Author: sebb
Date: Tue Oct 27 21:07:54 2015
New Revision: 1710887
URL: http://svn.apache.org/viewvc?rev=1710887&view=rev
Log:
COMDEV-175 - drop site/doap files
Modified:
comdev/projects.apache.org/STRUCTURE.txt
comdev/projects.apache.org/scripts/README.txt
comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
Modified: comdev/projects.apache.org/STRUCTURE.txt
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/STRUCTURE.txt?rev=1710887&r1=1710886&r2=1710887&view=diff
==============================================================================
--- comdev/projects.apache.org/STRUCTURE.txt (original)
+++ comdev/projects.apache.org/STRUCTURE.txt Tue Oct 27 21:07:54 2015
@@ -22,11 +22,6 @@ Layout of comdev/projects.apache.org:
/site/json/projects:
- Contains project-specific data extracted from projects' DOAP files.
-/site/doap:
- - Contains the equivalent DOAP data storage: 1 directory per committee,
- containing generated pmc.rdf + copied pmc-doap.rdf (by parsecommitteeinfo.py)
- + copied DOAP files (by parseprojects.py) from projects managed by the PMC
-
N.B. The directory structure should be owned by the www-data login (or whatever is used for
the webserver)
This is because at least one of the scripts (parsecommitteeinfo.py) may invoke SVN commands
Modified: comdev/projects.apache.org/scripts/README.txt
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/README.txt?rev=1710887&r1=1710886&r2=1710887&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/README.txt (original)
+++ comdev/projects.apache.org/scripts/README.txt Tue Oct 27 21:07:54 2015
@@ -21,8 +21,6 @@ various sources:
out: site/json/foundation/committees.json (updated)
+ site/json/foundation/committees-retired.json (updated)
+ site/json/foundation/pmcs.json - (used by reporter.a.o only)
- + site/doap/{committeeId}/pmc-doap.rdf - this is an exact copy of the file listed in
data/committees.xml
- + site/doap/{committeeId}/pmc.rdf - TODO: what purpose does this serve?
- parsecommitters.py: Fetches and parses the committer (LDAP) list via
people.apache.org.
@@ -47,4 +45,3 @@ various sources:
in: data/projects.xml + projects' DOAP files
out: site/json/projects/*.json - JSON versions of DOAP files
+ site/json/foundation/projects.json - combined listing of all projects
- + site/doap/{committeeId}/{project}.rdf - these are exact copies of the DOAPs listed
in data/projects.xml
Modified: comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py?rev=1710887&r1=1710886&r2=1710887&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py Tue Oct 27 21:07:54
2015
@@ -28,10 +28,6 @@ Updates:
Writes:
../../site/json/foundation/pmcs.json - for all PMCs
-../../site/doap/<committeeId>/pmc.rdf
-
-Copies:
-../../site/doap/<committeeId>/pmc-doap.rdf from PMC RDF file
"""
@@ -88,7 +84,7 @@ with open("../../data/committees.xml", "
xmldoc = minidom.parseString(f.read())
f.close()
-print("Copying PMC DOAP files to doap/<committeeId>/pmc-doap.rdf...")
+print("Extracting PMC DOAP file data for json/foundation/pmcs.json")
for loc in xmldoc.getElementsByTagName('location') :
url = loc.childNodes[0].data
try:
@@ -121,23 +117,6 @@ for loc in xmldoc.getElementsByTagName('
pmcs[committeeId] = pmcjson
- # copy PMC RDF data to /doap/{committeeId}/pmc-doap.rdf
- if type(rdf) is str:
- mode = "w"
- encoding = 'utf-8'
- else:
- mode = "wb"
- encoding = None
- path = "../../site/doap/%s" % committeeId
- try:
- os.stat(path)
- except:
- print("INFO: creating new directory %s for %s" % (path, url))
- os.mkdir(path)
- with open("%s/pmc-doap.rdf" % path, mode, encoding=encoding) as f:
- f.write(rdf)
- f.close()
-
except Exception as err:
print("ERROR: %s processing %s" % (err, url), file=sys.stderr)
@@ -219,30 +198,6 @@ for group in sorted(committees, key=keyo
committeesList.append(committee)
committeesMap[committeeId] = committee;
- # generate TLP PMC DOAP file at http://projects-new.apache.org/doap/{committeeId}/pmc.rdf
- doap = ET.Element('rdf:RDF', attrib= { 'xml:lang': 'en',
- 'xmlns': 'http://usefulinc.com/ns/doap#',
- 'xmlns:rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
- 'xmlns:asfext': 'http://projects.apache.org/ns/asfext#',
- 'xmlns:foaf': 'http://xmlns.com/foaf/0.1/'
- })
- doap_pmc = ET.SubElement(doap, 'asfext:pmc')
- ET.SubElement(doap_pmc, 'asfext:name').text = fullName
- ET.SubElement(doap_pmc, 'homepage', attrib = { 'rdf:resource': homepage})
- chair = committee['chair']
- if chair:
- doap_chair = ET.SubElement(doap_pmc, 'asfext:chair')
- doap_chair_person = ET.SubElement(doap_chair, 'foaf:Person')
- ET.SubElement(doap_chair_person, 'foaf:nick').text = committee['chair']
- ET.SubElement(doap_chair_person, 'foaf:name').text = people[committee['chair']]['name']
- directory = "../../site/doap/%s" % committeeId
- if not os.path.exists(directory):
- print("INFO: creating directory %s" % directory)
- os.makedirs(directory)
-# print("INFO: creating %s/pmc.pdf" % directory)
- with open("%s/pmc.rdf" % directory, "w", encoding='utf-8') as f:
- f.write(minidom.parseString(ET.tostring(doap, encoding="utf-8")).toprettyxml(indent="\t"))
- f.close()
else:
print("INFO: %s ignored - not yet in section 3" % fullName)
else:
Modified: comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parseprojects.py?rev=1710887&r1=1710886&r2=1710887&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parseprojects.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parseprojects.py Tue Oct 27 21:07:54 2015
@@ -18,7 +18,6 @@ parseprojects-failures.xml (if exists)
Writes:
../../site/json/foundation/projects.json
../../site/json/projects/%s.json
-../../site/doap/%s/%s.rdf
parseprojects-failures.xml (if failures occurred)
"""
@@ -202,10 +201,6 @@ for s in itemlist :
with open ("../../site/json/projects/%s.json" % projectJsonFilename, "w", encoding='utf-8')
as f:
json.dump(pjson, f, sort_keys=True, indent=0, ensure_ascii=False)
f.close()
- # copy project DOAP to /doap/<committee id>/<project id>.rdf
- with open ("../../site/doap/%s/%s.rdf" % (committeeId, projectJsonFilename),
"wb") as f:
- f.write(rdf)
- f.close()
else:
print("WARN: project ignored since unable to extract project json filename from
%s" % url)
except Exception as err:
|