aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-10-06 06:27:21 +0000
committerDavid Robillard <d@drobilla.net>2010-10-06 06:27:21 +0000
commitda7098065a000bae4ea5308d7fab32029d75db6c (patch)
tree31f1f4a724a288bf333fec3b92c43a86f385fb71
parent38d8a847b9d472f58cca37567be3200f48f4b07e (diff)
downloadlv2-da7098065a000bae4ea5308d7fab32029d75db6c.tar.xz
Generate all releases in the same directory.
Link to individual release as well as all releases in generated documentation.
-rwxr-xr-xgendoc.py13
-rwxr-xr-xlv2specgen/lv2specgen.py4
2 files changed, 10 insertions, 7 deletions
diff --git a/gendoc.py b/gendoc.py
index beca482..a3491fe 100755
--- a/gendoc.py
+++ b/gendoc.py
@@ -8,7 +8,6 @@ import re
import datetime
out_base = os.path.join('build', 'default', 'doc')
-
try:
shutil.rmtree(out_base)
except:
@@ -19,6 +18,12 @@ os.makedirs(out_base)
URIPREFIX = 'http://lv2plug.in/ns/'
SPECGENDIR = './specgen'
+release_dir = os.path.join('build', 'default', 'spec')
+try:
+ os.mkdir(release_dir)
+except:
+ pass
+
print '** Generating core documentation'
lv2_outdir = os.path.join(out_base, 'lv2core')
@@ -51,7 +56,6 @@ for dir in ['ext', 'extensions']:
outdir = os.path.join(out_base, dir)
shutil.copytree(dir, outdir, ignore = lambda src, names: '.svn')
- os.mkdir(os.path.join(outdir, 'releases'))
index_html = """<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
@@ -103,10 +107,9 @@ SELECT ?rev FROM <%s.lv2/%s.ttl> WHERE { <%s> doap:release [ doap:revision ?rev
else:
rev = '0'
-
if rev != '0':
- subprocess.call(['tar', '-czf', outdir + '/releases/lv2-%s-%s.tar.gz' % (b, rev),
- outdir + '/%s.lv2' % b])
+ path = os.path.join(release_dir, 'lv2-%s-%s.tar.gz' % (b, rev))
+ subprocess.call(['tar', '-czf', path, os.path.join(outdir, '%s.lv2' % b)])
specgendir = '../../../../lv2specgen/'
if (os.access(outdir + '/%s.lv2/%s.ttl' % (b, b), os.R_OK)):
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 00290eb..527c11d 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -714,9 +714,9 @@ def specgen(specloc, docdir, template, instances=False, mode="spec"):
bundle_path = os.path.split(specloc[specloc.find(':')+1:])[0]
header_path = bundle_path + '/' + basename + '.h'
- other_files = '<li><a href=".">Bundle</a></li>\n'
+ other_files = '<li><a href=".">Online Bundle</a></li>\n'
if revision and revision[0] != '0':
- other_files += '<li><a href="http://lv2plug.in/spec">Releases</a></li>\n'
+ other_files += '<li><a href="http://lv2plug.in/spec/lv2-%s-%s.tar.gz">Release</a> (<a href="http://lv2plug.in/spec">all releases</a>)</li>\n' % (basename, revision[0])
if os.path.exists(os.path.abspath(header_path)):
other_files += '<li><a href="' + docdir + '/html/%s">Header Documentation</a></li>\n' % (
basename + '_8h.html')