diff options
| author | David Robillard <d@drobilla.net> | 2011-10-27 04:28:09 +0000 | 
|---|---|---|
| committer | David Robillard <d@drobilla.net> | 2011-10-27 04:28:09 +0000 | 
| commit | e932e9cb9e2cb0b1c004ef395c2d4bc1766261a8 (patch) | |
| tree | 335ea3aa998b9a901f668d314503c4a7c853122c /lv2specgen | |
| parent | 3dd1118914d369abcebba584a2ed3ffed19ce3b8 (diff) | |
| download | lv2-e932e9cb9e2cb0b1c004ef395c2d4bc1766261a8.tar.xz | |
Use consistent naming.
Diffstat (limited to 'lv2specgen')
| -rwxr-xr-x | lv2specgen/lv2specgen.py | 10 | 
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)  |