SPHINX-AUTOGEN(1) | Sphinx | SPHINX-AUTOGEN(1) |
sphinx-autogen - Generate autodoc stub pages
sphinx-autogen [options] <sourcefile> ...
sphinx-autogen is a tool for automatic generation of Sphinx sources that, using the autodoc extension, document items included in autosummary listing(s).
sourcefile is the path to one or more reStructuredText documents containing autosummary entries with the :toctree:: option set. sourcefile can be an fnmatch-style pattern.
Given the following directory structure:
docs ├── index.rst └── ... foobar ├── foo │ └── __init__.py └── bar ├── __init__.py └── baz └── __init__.py
and assuming docs/index.rst contained the following:
Modules ======= .. autosummary:: :toctree: modules foobar.foo foobar.bar foobar.bar.baz
If you run the following:
$ PYTHONPATH=. sphinx-autogen docs/index.rst
then the following stub files will be created in docs:
docs ├── index.rst └── modules ├── foobar.bar.rst ├── foobar.bar.baz.rst └── foobar.foo.rst
and each of those files will contain a autodoc directive and some other information.
sphinx-build(1), sphinx-apidoc(1)
2007-2024, the Sphinx developers
March 21, 2024 | 7.2.6 |