From c3aad56a8301d41af87ebb8e8a704e942ae04635 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Thu, 28 Oct 2010 17:01:55 +0200 Subject: [PATCH] added option to build json'y documentation --- doc/make.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/make.py b/doc/make.py index 1653dc73e..8fb157390 100644 --- a/doc/make.py +++ b/doc/make.py @@ -67,7 +67,9 @@ def _CollectRstDocs(outdir, dirname, fnames): def ParseArgs(): parser = OptionParser("usage: ost make.py [options] ") parser.add_option("-l","--linkcheck", action="store_true", default=False, dest="linkcheck", help="validate all external links") - parser.add_option("-b", "--build-html", action="store_true", default=False, dest="html", help="build html documentation") + parser.add_option("-b", "--build-html", action="store_true", + default=False, dest="html", help="build html documentation") + parser.add_option('-j', '--build-json', action='store_true', default=False) parser.add_option("-d", "--doctest", action="store_true", default=False, dest="doctest", help="run all test") parser.add_option("-q", "--quiet", action="store_true", default=False, dest="quiet", help="run all test") return parser.parse_args() @@ -88,10 +90,13 @@ sphinx_bin=settings.Locate(['sphinx-build', 'sphinx-build-2.6']) if opts.html: os.system('%s %s -b html -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', - 'doc/build')) + 'doc/build/html')) if opts.doctest: os.system('%s %s -b doctest -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', - 'doc/build')) + 'doc/build/doctest')) +if opts.build_json: + os.system('%s %s -b json -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', + 'doc/build/json')) if opts.linkcheck: os.system('%s %s -b linkcheck -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', - 'doc/build')) + 'doc/build/check')) -- GitLab