rebase: split into wrapper and module
[gtk-doc.git] / gtkdoc-mkhtml.in
blob00c777908bbefea8aa824ac5e43e7e22f5e3bf66
1 #!@PYTHON@
2 # -*- python; coding: utf-8 -*-
4 # gtk-doc - GTK DocBook documentation generator.
5 # Copyright (C) 1998 Owen Taylor
6 #               2001-2005 Damon Chaplin
7 #               2009-2017  Stefan Sauer
8 #               2017  Jussi Pakkanen
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 import argparse, sys
26 sys.path.append('@PYTHON_PACKAGE_DIR@')
28 from gtkdoc import config, mkhtml
30 if __name__== '__main__':
31     parser = argparse.ArgumentParser(description='gtkdoc-mkhtml version %s - generate documentation in html format' % config.version)
32     parser.add_argument('--version', action='version', version=config.version)
33     parser.add_argument('--verbose', default=False, action='store_true',
34                         help='Print extra output while processing')
35     parser.add_argument('--path', default=[], action='append',
36                         help='Extra source directories')
37     parser.add_argument('args', nargs='*',
38                         help='MODULE DRIVER_FILE')
39     # TODO: only for testing, replace with env-var
40     parser.add_argument('--uninstalled', action='store_true', default=False,
41                         help='???')
43     options = parser.parse_args()
44     if len(options.args) < 2:
45         sys.exit('Too few arguments')
47     sys.exit(mkhtml.run(options))