.\" 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-AUTOGEN" "1" "Sep 16, 2023" "7.2.6" "Sphinx" .SH NAME sphinx-autogen \- Generate autodoc stub pages .SH SYNOPSIS .sp \fBsphinx\-autogen\fP [\fIoptions\fP] ... .SH DESCRIPTION .sp \fBsphinx\-autogen\fP is a tool for automatic generation of Sphinx sources that, using the \fI\%autodoc\fP extension, document items included in \fI\%autosummary\fP listing(s). .sp \fIsourcefile\fP is the path to one or more reStructuredText documents containing \fI\%autosummary\fP entries with the \fB:toctree::\fP option set. \fIsourcefile\fP can be an \fI\%fnmatch\fP\-style pattern. .SH OPTIONS .INDENT 0.0 .TP .B \-o Directory to place the output file. If it does not exist, it is created. Defaults to the value passed to the \fB:toctree:\fP option. .UNINDENT .INDENT 0.0 .TP .B \-s , \-\-suffix Default suffix to use for generated files. Defaults to \fBrst\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-t , \-\-templates Custom template directory. Defaults to \fBNone\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-i, \-\-imported\-members Document imported members. .UNINDENT .INDENT 0.0 .TP .B \-a, \-\-respect\-module\-all Document exactly the members in a module\(aqs \fB__all__\fP attribute. .UNINDENT .SH EXAMPLE .sp Given the following directory structure: .INDENT 0.0 .INDENT 3.5 .sp .EX docs ├── index.rst └── ... foobar ├── foo │ └── __init__.py └── bar ├── __init__.py └── baz └── __init__.py .EE .UNINDENT .UNINDENT .sp and assuming \fBdocs/index.rst\fP contained the following: .INDENT 0.0 .INDENT 3.5 .sp .EX Modules ======= \&.. autosummary:: :toctree: modules foobar.foo foobar.bar foobar.bar.baz .EE .UNINDENT .UNINDENT .sp If you run the following: .INDENT 0.0 .INDENT 3.5 .sp .EX $ PYTHONPATH=. sphinx\-autogen docs/index.rst .EE .UNINDENT .UNINDENT .sp then the following stub files will be created in \fBdocs\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX docs ├── index.rst └── modules ├── foobar.bar.rst ├── foobar.bar.baz.rst └── foobar.foo.rst .EE .UNINDENT .UNINDENT .sp and each of those files will contain a \fI\%autodoc\fP directive and some other information. .SH SEE ALSO .sp \fBsphinx\-build(1)\fP, \fBsphinx\-apidoc(1)\fP .SH COPYRIGHT 2007-2023, the Sphinx developers .\" Generated by docutils manpage writer. .