aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen/lv2specgen.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-26 23:42:50 +0000
committerDavid Robillard <d@drobilla.net>2012-03-26 23:42:50 +0000
commit882cb0ae306d8a26699a1c9224640cc8cf8971a3 (patch)
tree9593407f173ffc53d5f8698a6f889979af75bb8d /lv2specgen/lv2specgen.py
parente01f7c8b0e4b3596d7f1d0d6d09ecd999fdbff42 (diff)
downloadlv2-882cb0ae306d8a26699a1c9224640cc8cf8971a3.tar.xz
Move files listing into contents. Hopefully a more obvious link to the API will appease the C curmudgeons.
Diffstat (limited to 'lv2specgen/lv2specgen.py')
-rwxr-xr-xlv2specgen/lv2specgen.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index dfd2549..5fab9ee 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -1150,7 +1150,9 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec
template = template.replace('@REVISION@', version_string)
- other_files = ''
+
+ header_files = ''
+ other_files = ''
see_also_files = specProperties(m, spec, rdfs.seeAlso)
see_also_files.sort()
for f in see_also_files:
@@ -1162,19 +1164,23 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec
else:
continue # Skip seeAlso file outside bundle
- other_files += '<a href="%s">%s</a> ' % (uri, uri)
- if uri.endswith('.h'):
+
+ entry = '<a href="%s">%s</a>' % (uri, uri)
+ if uri.endswith('.h') or uri.endswith('.hpp'):
name = os.path.basename(uri)
- other_files += '(<a href="%s">docs</a>) ' % (
+ entry += ' (<a href="%s">Documentation</a>) ' % (
docdir + '/' + name.replace('.', '_8') + '.html')
- other_files += ', '
-
- if other_files.endswith(', '):
- other_files = other_files[:len(other_files) - 2]
+ header_files += '<li>%s</li>' % entry
+ else:
+ other_files += '<li>%s</li>' % entry
- other_files = '<tr><th class="metahead">See Also</th><td>%s</td></tr>' % other_files
+ files = ''
+ if header_files:
+ files += '<li>API<ul>%s</ul></li>' % header_files
+ if other_files:
+ files += '<li>Data<ul>%s</ul></li>' % other_files
- template = template.replace('@FILES@', other_files)
+ template = template.replace('@FILES@', files)
comment = getComment(m, rdflib.URIRef(spec_url), classlist)
if comment != '':