diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-29 21:12:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-29 21:12:40 +0900 |
commit | 973c3ffa25f6f14e53382f7a45ffbeee9d252b3c (patch) | |
tree | d4d500f2dad3bbdab82820f1f4bb2ae5bc97a6ff /sphinx/ext/apidoc.py | |
parent | abcb5bd5eca6ea46ffcc34a55b663083d03f339c (diff) | |
parent | d2c3d54bb9a46c5e7a0d14c3345e489d7592de9a (diff) | |
download | sphinx-git-973c3ffa25f6f14e53382f7a45ffbeee9d252b3c.tar.gz |
Merge branch 'master' into change_master_doc_to_index
Diffstat (limited to 'sphinx/ext/apidoc.py')
-rw-r--r-- | sphinx/ext/apidoc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py index 8a7c68402..a154f6449 100644 --- a/sphinx/ext/apidoc.py +++ b/sphinx/ext/apidoc.py @@ -340,7 +340,9 @@ Note: By default this script will not overwrite already created files.""")) parser.add_argument('-P', '--private', action='store_true', dest='includeprivate', help=__('include "_private" modules')) - parser.add_argument('-T', '--no-toc', action='store_true', dest='notoc', + parser.add_argument('--tocfile', action='store', dest='tocfile', default='modules', + help=__("don't create a table of contents file")) + parser.add_argument('-T', '--no-toc', action='store_false', dest='tocfile', help=__("don't create a table of contents file")) parser.add_argument('-E', '--no-headings', action='store_true', dest='noheadings', @@ -453,8 +455,8 @@ def main(argv=sys.argv[1:]): if not args.dryrun: qs.generate(d, silent=True, overwrite=args.force) - elif not args.notoc: - create_modules_toc_file(modules, args) + elif args.tocfile: + create_modules_toc_file(modules, args, args.tocfile) return 0 |