diff options
author | David Robillard <d@drobilla.net> | 2011-11-05 04:09:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-11-05 04:09:37 +0000 |
commit | 09e404f50bcf96c8942d73b5b68baa2f0d6f3d02 (patch) | |
tree | 7efa0769bd651f3123ed995df309e52c0d4fc5fa | |
parent | 4ee818b680e6864e03d98aa945be1600471db578 (diff) | |
download | lv2-09e404f50bcf96c8942d73b5b68baa2f0d6f3d02.tar.xz |
Add stable, experimental, or deprecated status to extension index.
-rw-r--r-- | doc/style.css | 10 | ||||
-rwxr-xr-x | 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 } @@ -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']: <div id="header"><h1 id="title">LV2 Extension Index</h1></div> <div class="content"> <table summary="An index of LV2 extensions"> -<tr><th>Name</th><th>Description</th><th>Version</th><th>Date</th></tr>\n""" +<tr><th>Name</th><th>Description</th><th>Version</th><th>Date</th><th>Status</th></tr>\n""" extensions = [] @@ -185,28 +186,35 @@ for dir in ['ext', 'extensions']: os.chdir(oldcwd) # Name - li = '<tr><td><a rel="rdfs:seeAlso" href="%s">%s</a></td>' % (b, b) + row = '<tr><td><a rel="rdfs:seeAlso" href="%s">%s</a></td>' % (b, b) # Description if shortdesc: - li += '<td>' + str(shortdesc) + '</td>' + row += '<td>' + str(shortdesc) + '</td>' else: - li += '<td></td>' + row += '<td></td>' # Version version_str = '%s.%s' % (minor, micro) if minor == 0 or (micro % 2 != 0): - li += '<td><span style="color: red">' + version_str + ' dev</span></td>' + row += '<td><span style="color: red">' + version_str + ' dev</span></td>' else: - li += '<td>' + version_str + '</td>' + row += '<td>' + version_str + '</td>' # Date - if date: - li += '<td>' + str(date) + '</td>' - - li += '</tr>' - - extensions.append(li) + row += '<td>%s</td>' % (str(date) if date else '') + + # Status + deprecated = model.value(ext_node, owl.deprecated, None) + if minor == 0: + row += '<td><span class="error">Experimental</span></td>' + elif deprecated and str(deprecated[2]) != "false": + row += '<td><span class="warning">Deprecated</span></td>' + elif micro % 2 == 0: + row += '<td><span class="success">Stable</span></td>' + + row += '</tr>' + extensions.append(row) shutil.copy('doc/index.php', os.path.join(outdir, b + '.lv2', 'index.php')) |