aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-24 19:32:44 +0100
committerDavid Robillard <d@drobilla.net>2019-03-24 21:23:02 +0100
commitc5bb8d806d72ec9340188c558fab8d972db7891f (patch)
tree39b4893e98eae3952f8edac104b498231b2f1335
parent406cb860dec222d05026484faacda101ef0006a1 (diff)
downloadlv2-c5bb8d806d72ec9340188c558fab8d972db7891f.tar.xz
Don't build file index for offline documentation
-rwxr-xr-xlv2specgen/lv2specgen.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 1363303..e280b25 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -734,7 +734,7 @@ def getAnchor(uri):
return getShortName(uri)
-def buildIndex(m, classlist, proplist, instalist=None, filelist=None):
+def buildIndex(m, classlist, proplist, instalist=None, filelist=None, online=False):
if not (classlist or proplist or instalist or filelist):
return ''
@@ -802,7 +802,7 @@ def buildIndex(m, classlist, proplist, instalist=None, filelist=None):
body += '<li><a href="#%s">%s</a></li>' % (anchor, p)
body += '</ul></td>\n'
- if (filelist is not None and len(filelist) > 0):
+ if online and filelist and len(filelist) > 0:
head += '<th>Files</th>'
body += '<td><ul>'
for i in sorted(filelist):
@@ -1297,7 +1297,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False, root
filelist += [uri]
- azlist = buildIndex(m, classlist, proplist, instalist, filelist)
+ azlist = buildIndex(m, classlist, proplist, instalist, filelist, opts['online_docs'])
# Generate Term HTML
classlist = docTerms('Class', classlist, m, classlist, proplist, instalist)