From 4acfb4730957f814a36ed66421409e73775de6d8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 6 Sep 2012 01:25:53 +0000 Subject: Make documentation suitable for local installation. --- lv2specgen/lv2specgen.py | 25 ++++++++++++------------- lv2specgen/template.html | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'lv2specgen') diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index 9974265..28a84db 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -1037,7 +1037,7 @@ def load_tags(path, docdir): return linkmap -def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec"): +def specgen(specloc, indir, style_uri, docdir, tags, instances=False, offline=False): """The meat and potatoes: Everything starts here.""" global spec_url @@ -1159,9 +1159,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec template = template.replace('@REVISION@', version_string) - - header_files = '' - other_files = '' + file_list = '' see_also_files = specProperties(m, spec, rdfs.seeAlso) see_also_files.sort() for f in see_also_files: @@ -1173,21 +1171,22 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec else: continue # Skip seeAlso file outside bundle - - entry = '%s' % (uri, uri) + + if offline: + entry = uri + else: + entry = '%s' % (uri, uri) if uri.endswith('.h') or uri.endswith('.hpp'): name = os.path.basename(uri) - entry += ' (Documentation) ' % ( + entry += ' - Documentation ' % ( docdir + '/' + name.replace('.', '_8') + '.html') - header_files += '
  • %s
  • ' % entry + file_list += '
  • %s
  • ' % entry else: - other_files += '
  • %s
  • ' % entry + file_list += '
  • %s
  • ' % entry files = '' - if header_files: - files += '
  • API
  • ' % header_files - if other_files: - files += '
  • Data
  • ' % other_files + if file_list: + files += '
  • Files
  • ' % file_list template = template.replace('@FILES@', files) diff --git a/lv2specgen/template.html b/lv2specgen/template.html index 4544323..691f6fd 100644 --- a/lv2specgen/template.html +++ b/lv2specgen/template.html @@ -84,7 +84,7 @@ href="http://jigsaw.w3.org/css-validator/check/referer"> CSS - generated on @TIME@ from @FILENAME@ by lv2specgen + generated from @FILENAME@ by lv2specgen -- cgit v1.2.1