aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-08-08 04:11:52 +0000
committerDavid Robillard <d@drobilla.net>2014-08-08 04:11:52 +0000
commit713944a16b861e1bd2f1da85fb45e9c4cc550498 (patch)
treeb272f82ce8751951654d1ccb4588098c1a4697a9
parent74d7751c37d2c991d244c1c23e1a4cd24451ac41 (diff)
downloadlv2-713944a16b861e1bd2f1da85fb45e9c4cc550498.tar.xz
Order history entries by date.
-rwxr-xr-xlv2specgen/lv2specgen.py2
-rw-r--r--wscript17
2 files changed, 10 insertions, 9 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 72845af..f62de8d 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -964,7 +964,7 @@ def specHistoryEntries(m, subject, entries={}):
entry += '<dd><ul>\n%s' % releaseChangeset(m, release)
if dist is not None:
- entries[getObject(dist)] = entry
+ entries[(getObject(created), getObject(dist))] = entry
return entries
diff --git a/wscript b/wscript
index 95d7f8c..841594f 100644
--- a/wscript
+++ b/wscript
@@ -259,13 +259,15 @@ def build_index(task):
dists = []
for r in model.triples([proj, doap.release, None]):
revision = model.value(r[2], doap.revision, None)
+ created = model.value(r[2], doap.created, None)
if str(revision) == VERSION:
- date = model.value(r[2], doap.created, None)
+ date = created
dist = model.value(r[2], doap['file-release'], None)
- if dist:
- dists += [dist]
- dists.sort()
+ if dist and created:
+ dists += [(created, dist)]
+ else:
+ print('warning: %s has no file release\n' % proj)
# Get history for this LV2 release
entries = lv2specgen.specHistoryEntries(model, proj)
@@ -279,13 +281,12 @@ def build_index(task):
spec = m.value(None, rdf.type, lv2.Specification)
if spec:
for dist in dists:
- release = m.value(None, doap['file-release'], dist)
+ release = m.value(None, doap['file-release'], dist[1])
if release:
entries[dist] += lv2specgen.releaseChangeset(m, release, str(name))
- # Filter entries for post-unification LV2 distributions only
- unified_entries = { dist: entries[dist] for dist in dists }
- history = lv2specgen.specHistoryMarkup(unified_entries)
+ # Generate history for all post-unification LV2 distributions
+ history = lv2specgen.specHistoryMarkup(entries)
global index_lines
rows = []