diff options
author | David Robillard <d@drobilla.net> | 2010-10-06 06:27:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-10-06 06:27:21 +0000 |
commit | da7098065a000bae4ea5308d7fab32029d75db6c (patch) | |
tree | 31f1f4a724a288bf333fec3b92c43a86f385fb71 /gendoc.py | |
parent | 38d8a847b9d472f58cca37567be3200f48f4b07e (diff) | |
download | lv2-da7098065a000bae4ea5308d7fab32029d75db6c.tar.xz |
Generate all releases in the same directory.
Link to individual release as well as all releases in generated documentation.
Diffstat (limited to 'gendoc.py')
-rwxr-xr-x | gendoc.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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)): |