From 12a26389f8b278b1039e921e0ae00af4112b16e5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 22 Nov 2011 00:52:38 +0000 Subject: Don't link to releases for experimental extensions. --- lv2specgen/lv2specgen.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'lv2specgen') diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index e602dcb..76b272c 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -1086,7 +1086,8 @@ def specgen(specloc, indir, docdir, style_uri, doc_base, doclinks, instances=Fal date_string = "Undated" version_string = "%s.%s (%s)" % (version[0], version[1], date_string) - if version[0] == 0 or version[1] % 2 == 1: + experimental = (version[0] == 0 or version[1] % 2 == 1) + if experimental: version_string += ' EXPERIMENTAL' deprecated = findOne(m, rdflib.URIRef(spec_url), owl.deprecated, None) @@ -1098,18 +1099,19 @@ def specgen(specloc, indir, docdir, style_uri, doc_base, doclinks, instances=Fal header_path = bundle_path + '/' + basename + '.h' other_files = '' - if version[0] != '0': + if not experimental: release_name = "lv2-" + basename if basename == "lv2": release_name = "lv2core" - other_files += 'Release' % (release_name, version[0], version[1]) - other_files += ', All releases' + other_files += 'Release, ' % (release_name, version[0], version[1]) + other_files += 'All releases, ' + if os.path.exists(os.path.abspath(header_path)): - other_files += ', API documentation' % ( + other_files += 'API documentation, ' % ( basename + '_8h.html') header = basename + '.h' - other_files += ', %s' % (header, header) + other_files += '%s, ' % (header, header) see_also_files = specProperties(m, spec_url, rdfs.seeAlso) for f in see_also_files: @@ -1121,7 +1123,10 @@ def specgen(specloc, indir, docdir, style_uri, doc_base, doclinks, instances=Fal else: print("warning: seeAlso file outside bundle: %s" % uri) - other_files += ', %s' % (uri, uri) + other_files += '%s, ' % (uri, uri) + + if other_files.endswith(', '): + other_files = other_files[:len(other_files) - 2] other_files = 'See Also%s' % other_files -- cgit v1.2.1