mkhtml2: handle id-references on structfields
[gtk-doc.git] / gtkdoc-fixxref.in
blob44f6bd1460abcefbd2700a85c2ca766084dd3686
1 #!@PYTHON@
2 # -*- python -*-
4 # gtk-doc - GTK DocBook documentation generator.
5 # Copyright (C) 1998  Damon Chaplin
6 #               2007-2016  Stefan Sauer
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 import argparse
24 import os
25 import sys
26 sys.path.append('@PYTHON_PACKAGE_DIR@')
28 from gtkdoc import common, config, fixxref
31 if __name__ == '__main__':
32     parser = argparse.ArgumentParser(
33         description='gtkdoc-fixxref version %s - fix cross references in html files' % config.version)
34     parser.add_argument('--version', action='version', version=config.version)
35     parser.add_argument('--module', required=True,
36                         help='Name of the doc module being processed.')
37     parser.add_argument('--module-dir', default='',
38                         help='The directory which contains the generated HTML.')
39     parser.add_argument('--html-dir', default='',
40                         help='The directory where gtk-doc generated documentation is'
41                        'installed.')
42     parser.add_argument('--extra-dir', default=[], action='append',
43                         help='Directories to recursively scan for indices (*.devhelp2)'
44                         'in addition to HTML_DIR')
45     parser.add_argument('--src-lang', default='c',
46                         help='Programing language used for syntax highlighting. The'
47                         'available languages depend on the source'
48                         'highlighter you use.')
50     options = parser.parse_args()
52     if not options.module_dir:
53         options.module_dir = os.path.join(options.html_dir, options.module)
55     common.setup_logging()
57     fixxref.Run(options)