aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-09 21:32:29 +0000
committerDavid Robillard <d@drobilla.net>2011-03-09 21:32:29 +0000
commit4c7ffdc602622e9c019abdc86e9c6c36ea1f4a76 (patch)
treea25517e2afb54fbd89a63c680056a85085a47f75 /lv2specgen
parentdf5619b514d158821ad11e953e7882262f986472 (diff)
downloadlv2-4c7ffdc602622e9c019abdc86e9c6c36ea1f4a76.tar.xz
Fix duplicate developer/maintainer names.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index d4ca5cf..b872385 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -576,24 +576,29 @@ def specProperties(m, subject, predicate):
def specAuthors(m, subject):
"Return an HTML description of the authors of the spec."
- dev = ''
+ dev = set()
for i in m.find_statements(RDF.Statement(None, doap.developer, None)):
for j in m.find_statements(RDF.Statement(i.object, foaf.name, None)):
- dev += '<div class="author" property="doap:developer">%s</div>' % j.object.literal_value['string']
+ dev.add(j.object.literal_value['string'])
- maint = ''
+ dev_str = ''
+ for d in dev:
+ dev_str += '<div class="author" property="doap:developer">%s</div>' % d
+
+ maint = set()
for i in m.find_statements(RDF.Statement(None, doap.maintainer, None)):
for j in m.find_statements(RDF.Statement(i.object, foaf.name, None)):
- maint += '<div class="author" property="doap:maintainer">%s</div>' % j.object.literal_value['string']
+ maint.add(j.object.literal_value['string'])
- if dev == '' and maint == '':
- return ''
+ maint_str = ''
+ for m in maint:
+ maint_str += '<div class="author" property="doap:maintainer">%s</div>' % m
ret = ''
- if dev != '':
- ret += '<tr><th class="metahead">Developer(s)</th><td>' + dev + '</td></tr>'
- if maint != '':
- ret += '<tr><th class="metahead">Maintainer(s)</th><td>' + maint + '</td></tr>'
+ if dev_str != '':
+ ret += '<tr><th class="metahead">Developer(s)</th><td>' + dev_str + '</td></tr>'
+ if maint_str != '':
+ ret += '<tr><th class="metahead">Maintainer(s)</th><td>' + maint_str + '</td></tr>'
return ret