diff options
author | David Robillard <d@drobilla.net> | 2019-02-03 16:39:30 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-02-03 16:39:30 +0100 |
commit | bb9141e5ccadc65ce76152b9291e88f47983d4a7 (patch) | |
tree | e067cb64e5a79808ebe00ab6c6541e2940a2dd8d /wscript | |
parent | 96a6283a5fe023c59113242631f337da5f0eb278 (diff) | |
download | lv2-bb9141e5ccadc65ce76152b9291e88f47983d4a7.tar.xz |
Fix duplicate news entries in documentation
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -133,11 +133,12 @@ def ttl_files(path, specdir): return map(abspath, path.ant_glob(specdir.path_from(path) + '/*.ttl')) -def load_ttl(files): +def load_ttl(files, exclude = []): import rdflib model = rdflib.ConjunctiveGraph() for f in files: - model.parse(f, format='n3') + if f not in exclude: + model.parse(f, format='n3') return model # Task to build extension index @@ -175,9 +176,11 @@ def build_index(task): ctx = task.generator.bld subdirs = specdirs(ctx.path) for specdir in subdirs: - m = load_ttl(ttl_files(ctx.path, specdir)) - name = os.path.basename(specdir.abspath()) - spec = m.value(None, rdf.type, lv2.Specification) + files = ttl_files(ctx.path, specdir) + exclude = [os.path.join(str(ctx.path), 'lv2/core/meta.ttl')] + m = load_ttl(files, exclude) + name = os.path.basename(specdir.abspath()) + spec = m.value(None, rdf.type, lv2.Specification) if spec: for dist in dists: release = m.value(None, doap['file-release'], dist[1]) |