aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-27 04:28:09 +0000
committerDavid Robillard <d@drobilla.net>2011-10-27 04:28:09 +0000
commite932e9cb9e2cb0b1c004ef395c2d4bc1766261a8 (patch)
tree335ea3aa998b9a901f668d314503c4a7c853122c
parent3dd1118914d369abcebba584a2ed3ffed19ce3b8 (diff)
downloadlv2-e932e9cb9e2cb0b1c004ef395c2d4bc1766261a8.tar.xz
Use consistent naming.
-rwxr-xr-xlv2specgen/lv2specgen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 2cda497..6f724b7 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -123,7 +123,7 @@ def niceName(uri):
return uri
-def return_name(m, urinode):
+def termName(m, urinode):
"Trims the namespace out of a term to give a name to the term."
return str(urinode.uri).replace(spec_ns_str, "")
@@ -475,7 +475,7 @@ def docTerms(category, list, m):
doc = ""
nspre = spec_pre
for item in list:
- t = return_name(m, item)
+ t = termName(m, item)
if (t.startswith(spec_ns_str)) and (
len(t[len(spec_ns_str):].split("/")) < 2):
term = t
@@ -571,7 +571,7 @@ def buildIndex(m, classlist, proplist, instalist=None):
if not isEnd(findStatements(m, c, rdfs.subClassOf, None)):
continue
shown[c] = True
- name = return_name(m, c)
+ name = termName(m, c)
if name.startswith(spec_ns_str):
name = name.split(spec_ns_str[-1])[1]
azlist += '<li><a href="#%s">%s</a>' % (name, name)
@@ -582,7 +582,7 @@ def buildIndex(m, classlist, proplist, instalist=None):
if not isEnd(statements):
tree += '<ul>'
for s in statements:
- s_name = return_name(m, getSubject(s))
+ s_name = termName(m, getSubject(s))
tree += '<li><a href="#%s">%s</a>\n' % (s_name, s_name)
tree += class_tree(getSubject(s))
tree += '</li>'
@@ -596,7 +596,7 @@ def buildIndex(m, classlist, proplist, instalist=None):
azlist += "<dt>Properties</dt><dd>"
proplist.sort()
for p in proplist:
- name = return_name(m, p)
+ name = termName(m, p)
if name.startswith(spec_ns_str):
name = name.split(spec_ns_str[-1])[1]
azlist = """%s <a href="#%s">%s</a>, """ % (azlist, name, name)