# -*- mode: python -*-
import Consodoc
in_file = 'in/guide.xml'
env = Consodoc.default_process(
  in_file = in_file,
  in_xslt = 'support/guide.xsl'
)
Depends('tmp/guide.pdf', 'support/guide.cls')
Depends('tmp/guide.xml', '../license.xml')

# HTML generation
bld = Builder(action = '''xsltproc \
--xinclude \
--stringparam base.dir out/ \
--stringparam chunk.section.depth 3 \
--stringparam use.id.as.filename 1 \
--stringparam chunker.output.encoding utf-8 \
support/html.xsl $SOURCE''')
env['BUILDERS']['htmlgen'] = bld
env.htmlgen('html', in_file)
