From 09e404f50bcf96c8942d73b5b68baa2f0d6f3d02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 5 Nov 2011 04:09:37 +0000 Subject: Add stable, experimental, or deprecated status to extension index. --- doc/style.css | 10 +++++++++- gendoc.py | 32 ++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/doc/style.css b/doc/style.css index 1a28ca9..9943318 100644 --- a/doc/style.css +++ b/doc/style.css @@ -499,10 +499,18 @@ code { h1, h2, h3, h4, h5, h6, th { text-align: left; } -.warning { +.error { color: red; font-weight: bold; } +.warning { + color: orange; + font-weight: bold; +} +.success { + color: green; + font-weight: bold; +} /* Pygments Style */ .hll { background-color: #ffffcc } diff --git a/gendoc.py b/gendoc.py index b22bca9..2587e7b 100755 --- a/gendoc.py +++ b/gendoc.py @@ -30,6 +30,7 @@ TAGFILE = './doclinks' doap = rdflib.Namespace('http://usefulinc.com/ns/doap#') lv2 = rdflib.Namespace('http://lv2plug.in/ns/lv2core#') +owl = rdflib.Namespace('http://www.w3.org/2002/07/owl#') rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#') devnull = open(os.devnull, 'w') @@ -120,7 +121,7 @@ for dir in ['ext', 'extensions']:
-\n""" +\n""" extensions = [] @@ -185,28 +186,35 @@ for dir in ['ext', 'extensions']: os.chdir(oldcwd) # Name - li = '' % (b, b) + row = '' % (b, b) # Description if shortdesc: - li += '' + row += '' else: - li += '' + row += '' # Version version_str = '%s.%s' % (minor, micro) if minor == 0 or (micro % 2 != 0): - li += '' + row += '' else: - li += '' + row += '' # Date - if date: - li += '' - - li += '' - - extensions.append(li) + row += '' % (str(date) if date else '') + + # Status + deprecated = model.value(ext_node, owl.deprecated, None) + if minor == 0: + row += '' + elif deprecated and str(deprecated[2]) != "false": + row += '' + elif micro % 2 == 0: + row += '' + + row += '' + extensions.append(row) shutil.copy('doc/index.php', os.path.join(outdir, b + '.lv2', 'index.php')) -- cgit v1.2.1
NameDescriptionVersionDate
NameDescriptionVersionDateStatus
%s
%s' + str(shortdesc) + '' + str(shortdesc) + '' + version_str + ' dev' + version_str + ' dev' + version_str + '' + version_str + '' + str(date) + '
%sExperimentalDeprecatedStable