c10e-html: strip more stuff
[gtk-doc.git] / gtkdoc / mkman.py
blobcc4deb349ffa49c6e26452b8479567afc94a2ace
1 # -*- python; coding: utf-8 -*-
3 # gtk-doc - GTK DocBook documentation generator.
4 # Copyright (C) 1998 Owen Taylor
5 # 2001-2005 Damon Chaplin
6 # 2009-2017 Stefan Sauer
7 # 2017 Jussi Pakkanen
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 import subprocess
26 from . import config
29 def run(options):
30 logging.info('options: %s', str(options.__dict__))
32 module = options.args[0]
33 document = options.args[1]
34 if options.verbose:
35 quiet = '0'
36 else:
37 quiet = '1'
39 # we could do "--path $PWD " to avoid needing rewriting entities that
40 # are copied from the header into docs under xml
41 path_arg = []
42 for path in options.path:
43 path_arg += ['--path', path]
45 # would it make sense to create man pages only for certain refentries
46 # e.g. for tools
47 # see http://bugzilla.gnome.org/show_bug.cgi?id=467488
48 return subprocess.call([config.xsltproc] + path_arg + [
49 '--nonet',
50 '--xinclude',
51 '--stringparam',
52 'gtkdoc.bookname',
53 module,
54 '--stringparam',
55 'gtkdoc.version',
56 config.version,
57 '--stringparam',
58 'chunk.quietly ',
59 quiet,
60 '--stringparam',
61 'chunker.output.quiet',
62 quiet,
63 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
64 document])