aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-10-25 04:00:42 +0000
committerDavid Robillard <d@drobilla.net>2010-10-25 04:00:42 +0000
commit8b4982def7eef9ba63ef1b640ebc93ee33248c86 (patch)
tree829cbd8465748ba4cd3f2a351d6a135e879bdd2f /lv2specgen
parent8c298fee2fbf5e708b0006fc4816e81fb3ba7d9d (diff)
downloadlv2-8b4982def7eef9ba63ef1b640ebc93ee33248c86.tar.xz
Support to links to structure documentation via "urn:struct" URI scheme.
For example, <a href="urn:struct:LV2_Plugin">this</a> will be a link to the doxygen-generated documentation for LV2_Plugin.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index bb901f9..8fc1f93 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -405,7 +405,14 @@ def docTerms(category, list, m):
if label!='':
doc += "<div property=\"rdfs:label\" class=\"label\">%s</div>" % label
if comment!='':
- doc += "<div property=\"rdfs:comment\">%s</div>" % comment.replace('\n\n', '<br /><br />')
+ comment = comment.replace('\n\n', '<br /><br />')
+ matches = re.findall('href="urn:struct:([^"]*)"', comment)
+ if matches:
+ for match in matches:
+ struct_uri = "../../doc/html/struct" + match.replace('_', '__') + '.html'
+ comment = comment.replace('href="urn:struct:' + match + '"',
+ 'href="' + struct_uri + '"')
+ doc += "<div property=\"rdfs:comment\">%s</div>" % comment
if label!='' or comment != '':
doc += "</div>"
terminfo = ""