.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "SPHINX-APIDOC" "1" "Sep 16, 2023" "7.2.6" "Sphinx" .SH NAME sphinx-apidoc \- Sphinx API doc generator tool .SH SYNOPSIS .sp \fBsphinx\-apidoc\fP [\fIOPTIONS\fP] \-o <\fIOUTPUT_PATH\fP> <\fIMODULE_PATH\fP> [\fIEXCLUDE_PATTERN\fP ...] .SH DESCRIPTION .sp \fBsphinx\-apidoc\fP is a tool for automatic generation of Sphinx sources that, using the \fI\%autodoc\fP extension, document a whole package in the style of other automatic API documentation tools. .sp \fIMODULE_PATH\fP is the path to a Python package to document, and \fIOUTPUT_PATH\fP is the directory where the generated sources are placed. Any \fIEXCLUDE_PATTERN\fPs given are \fI\%fnmatch\-style\fP file and/or directory patterns that will be excluded from generation. .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 \fBsphinx\-apidoc\fP generates source files that use \fI\%sphinx.ext.autodoc\fP to document all found modules. If any modules have side effects on import, these will be executed by \fBautodoc\fP when \fBsphinx\-build\fP is run. .sp If you document scripts (as opposed to library modules), make sure their main routine is protected by a \fBif __name__ == \(aq__main__\(aq\fP condition. .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-o Directory to place the output files. If it does not exist, it is created. .UNINDENT .INDENT 0.0 .TP .B \-q Do not output anything on standard output, only write warnings and errors to standard error. .UNINDENT .INDENT 0.0 .TP .B \-f, \-\-force Force overwriting of any existing generated files. .UNINDENT .INDENT 0.0 .TP .B \-l, \-\-follow\-links Follow symbolic links. Defaults to \fBFalse\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-n, \-\-dry\-run Do not create any files. .UNINDENT .INDENT 0.0 .TP .B \-s Suffix for the source files generated. Defaults to \fBrst\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-d Maximum depth for the generated table of contents file. Defaults to \fB4\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-tocfile Filename for a table of contents file. Defaults to \fBmodules\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-T, \-\-no\-toc Do not create a table of contents file. Ignored when \fI\%\-\-full\fP is provided. .UNINDENT .INDENT 0.0 .TP .B \-F, \-\-full Generate a full Sphinx project (\fBconf.py\fP, \fBMakefile\fP etc.) using the same mechanism as \fBsphinx\-quickstart\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-e, \-\-separate Put documentation for each module on its own page. .sp New in version 1.2. .UNINDENT .INDENT 0.0 .TP .B \-E, \-\-no\-headings Do not create headings for the modules/packages. This is useful, for example, when docstrings already contain headings. .UNINDENT .INDENT 0.0 .TP .B \-P, \-\-private Include \(dq_private\(dq modules. .sp New in version 1.2. .UNINDENT .INDENT 0.0 .TP .B \-\-implicit\-namespaces By default sphinx\-apidoc processes sys.path searching for modules only. Python 3.3 introduced \fI\%PEP 420\fP implicit namespaces that allow module path structures such as \fBfoo/bar/module.py\fP or \fBfoo/bar/baz/__init__.py\fP (notice that \fBbar\fP and \fBfoo\fP are namespaces, not modules). .sp Interpret paths recursively according to PEP\-0420. .UNINDENT .INDENT 0.0 .TP .B \-M, \-\-module\-first Put module documentation before submodule documentation. .UNINDENT .sp These options are used when \fI\%\-\-full\fP is specified: .INDENT 0.0 .TP .B \-a Append module_path to sys.path. .UNINDENT .INDENT 0.0 .TP .B \-H Sets the project name to put in generated files (see \fI\%project\fP). .UNINDENT .INDENT 0.0 .TP .B \-A Sets the author name(s) to put in generated files (see \fI\%copyright\fP). .UNINDENT .INDENT 0.0 .TP .B \-V Sets the project version to put in generated files (see \fI\%version\fP). .UNINDENT .INDENT 0.0 .TP .B \-R Sets the project release to put in generated files (see \fI\%release\fP). .UNINDENT .sp Project templating .sp New in version 2.2: Project templating options for sphinx\-apidoc .INDENT 0.0 .TP .B \-t, \-\-templatedir=TEMPLATEDIR Template directory for template files. You can modify the templates of sphinx project files generated by apidoc. Following Jinja2 template files are allowed: .INDENT 7.0 .IP \(bu 2 \fBmodule.rst_t\fP .IP \(bu 2 \fBpackage.rst_t\fP .IP \(bu 2 \fBtoc.rst_t\fP .IP \(bu 2 \fBroot_doc.rst_t\fP .IP \(bu 2 \fBconf.py_t\fP .IP \(bu 2 \fBMakefile_t\fP .IP \(bu 2 \fBMakefile.new_t\fP .IP \(bu 2 \fBmake.bat_t\fP .IP \(bu 2 \fBmake.bat.new_t\fP .UNINDENT .sp In detail, please refer the system template files Sphinx provides. (\fBsphinx/templates/apidoc\fP and \fBsphinx/templates/quickstart\fP) .UNINDENT .SH ENVIRONMENT .INDENT 0.0 .TP .B SPHINX_APIDOC_OPTIONS A comma\-separated list of option to append to generated \fBautomodule\fP directives. Defaults to \fBmembers,undoc\-members,show\-inheritance\fP\&. .UNINDENT .SH SEE ALSO .sp \fBsphinx\-build(1)\fP, \fBsphinx\-autogen(1)\fP .SH COPYRIGHT 2007-2023, the Sphinx developers .\" Generated by docutils manpage writer. .