.\" Man page generated from reStructuredText. . .TH "SPHINX-AUTOGEN" "1" "Feb 16, 2019" "1.8.4" "Sphinx" .SH NAME sphinx-autogen \- Generate autodoc stub pages . .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 .. .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 \fBautodoc\fP extension, document items included in \fBautosummary\fP listing(s). .sp \fIsourcefile\fP is the path to one or more reStructuredText documents containing \fBautosummary\fP entries with the \fB:toctree::\fP option set. \fIsourcefile\fP can be an \fBfnmatch\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 .SH EXAMPLE .sp Given the following directory structure: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C docs ├── index.rst └── ... foobar ├── foo │ └── __init__.py └── bar ├── __init__.py └── baz └── __init__.py .ft P .fi .UNINDENT .UNINDENT .sp and assuming \fBdocs/index.rst\fP contained the following: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C Modules ======= \&.. autosummary:: :toctree: modules foobar.foo foobar.bar foobar.bar.baz .ft P .fi .UNINDENT .UNINDENT .sp If you run the following: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ PYTHONPATH=. sphinx\-autodoc doc/index.rst .ft P .fi .UNINDENT .UNINDENT .sp then the following stub files will be created in \fBdocs\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C docs ├── index.rst └── modules ├── foobar.bar.rst ├── foobar.bar.baz.rst └── foobar.foo.rst .ft P .fi .UNINDENT .UNINDENT .sp and each of those files will contain a \fBautodoc\fP directive and some other information. .SH SEE ALSO .sp \fBsphinx\-build(1)\fP, \fBsphinx\-apidoc(1)\fP .SH COPYRIGHT 2007-2019, Georg Brandl and the Sphinx team .\" Generated by docutils manpage writer. .