aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-26 16:21:49 -0500
committerDavid Robillard <d@drobilla.net>2014-11-26 16:25:51 -0500
commit3ec294f44bb3daac4814b2e63ad3234fe5cefcf6 (patch)
tree66a1dcfe104534a424779b8c2f1627c039249845 /lv2specgen
parentd894b8367f9590a2e6e56be3bd84f2ed7c7def62 (diff)
downloadlv2-3ec294f44bb3daac4814b2e63ad3234fe5cefcf6.tar.xz
Add link to spec index on spec pages.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 00310d6..0aea05b 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -1113,7 +1113,7 @@ def load_tags(path, docdir):
return linkmap
-def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False):
+def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False, root_link=None):
"""The meat and potatoes: Everything starts here."""
global spec_url
@@ -1221,7 +1221,11 @@ def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False):
if instances:
termlist += docTerms('Instance', instalist, m, classlist, proplist, instalist)
- template = template.replace('@NAME@', specProperty(m, spec, doap.name))
+ name = specProperty(m, spec, doap.name)
+ if root_link:
+ name = '<a href="%s">%s</a>' % (root_link, name)
+
+ template = template.replace('@NAME@', name)
template = template.replace('@SHORT_DESC@', specProperty(m, spec, doap.shortdesc))
template = template.replace('@URI@', spec)
template = template.replace('@PREFIX@', spec_pre)