Changeset 2111
- Timestamp:
- 06/14/09 16:59:15 (15 months ago)
- Location:
- trunk/lv2specgen
- Files:
-
- 2 modified
-
lv2specgen.py (modified) (8 diffs)
-
template.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lv2specgen/lv2specgen.py
r2099 r2111 72 72 "http://purl.org/dc/elements/1.1/" : "dc", 73 73 "http://purl.org/dc/terms/" : "dct", 74 "http://usefulinc.com/ns/doap#" : "doap",75 74 "http://www.w3.org/2003/06/sw-vocab-status/ns#" : "status", 76 75 "http://purl.org/rss/1.0/modules/content/" : "content", … … 87 86 lv2 = RDF.NS('http://lv2plug.in/ns/lv2core#') 88 87 doap = RDF.NS('http://usefulinc.com/ns/doap#') 88 foaf = RDF.NS('http://xmlns.com/foaf/0.1/') 89 89 90 90 termdir = './doc' #TODO … … 150 150 doc = termlink(doc) 151 151 except: 152 return "" # "<p>No detailed documentation for this term.</p>"152 return "" # "<p>No detailed documentation for this term.</p>" 153 153 return doc 154 154 … … 324 324 if o.current(): 325 325 res += "<dt>OWL Type:</dt><dd>DatatypeProperty</dd>\n" 326 326 327 327 # Object Property ( owl.ObjectProperty ) 328 328 o = m.find_statements( RDF.Statement(term, rdf.type, owl.ObjectProperty) ) … … 344 344 if o.current(): 345 345 res += "<dt>OWL Type:</dt><dd>SymmetricProperty</dd>\n" 346 346 347 347 return res 348 348 … … 532 532 return '' 533 533 534 def specAuthors(m, subject): 535 "Return an HTML description of the authors of the spec." 536 ret = '' 537 for i in m.find_statements(RDF.Statement(None, doap.maintainer, None)): 538 for j in m.find_statements(RDF.Statement(i.object, foaf.name, None)): 539 ret += '<div class="author">' + j.object.literal_value['string'] + '</div>\n' 540 return ret 541 534 542 def getInstances(model, classes, properties): 535 543 """ … … 625 633 template = template.replace('@MAIL@', 'devel@lists.lv2plug.in') 626 634 template = template.replace('@COMMENT@', specProperty(m, spec_url, rdfs.comment)) 635 template = template.replace('@AUTHORS@', specAuthors(m, spec_url)) 627 636 628 637 return template … … 706 715 usage() 707 716 708 # Sestination717 # Destination 709 718 dest = args[3] 710 719 -
trunk/lv2specgen/template.html
r2097 r2111 17 17 <dt>Authors:</dt> 18 18 <dd>@AUTHORS@</dd> 19 <dt>Maintainer:</dt>20 <dd>@MAINTAINERS@</dd>21 19 </dl> 22 20
