From 4c7ffdc602622e9c019abdc86e9c6c36ea1f4a76 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 9 Mar 2011 21:32:29 +0000 Subject: Fix duplicate developer/maintainer names. --- lv2specgen/lv2specgen.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'lv2specgen') 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 += '
%s
' % j.object.literal_value['string'] + dev.add(j.object.literal_value['string']) - maint = '' + dev_str = '' + for d in dev: + dev_str += '
%s
' % 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 += '
%s
' % 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 += '
%s
' % m ret = '' - if dev != '': - ret += 'Developer(s)' + dev + '' - if maint != '': - ret += 'Maintainer(s)' + maint + '' + if dev_str != '': + ret += 'Developer(s)' + dev_str + '' + if maint_str != '': + ret += 'Maintainer(s)' + maint_str + '' return ret -- cgit v1.2.1