aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/style.css10
-rwxr-xr-xgendoc.py32
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']:
<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'))