1SPHINX-AUTOGEN(1)                   Sphinx                   SPHINX-AUTOGEN(1)
2
3
4

NAME

6       sphinx-autogen - Generate autodoc stub pages
7

SYNOPSIS

9       sphinx-autogen [options] <sourcefile> …
10

DESCRIPTION

12       sphinx-autogen  is  a  tool  for automatic generation of Sphinx sources
13       that, using the autodoc extension, document items included in  autosum‐
14       mary listing(s).
15
16       sourcefile  is  the path to one or more reStructuredText documents con‐
17       taining autosummary entries with the :toctree:: option set.  sourcefile
18       can be an fnmatch-style pattern.
19

OPTIONS

21       -o <outputdir>
22              Directory  to place the output file. If it does not exist, it is
23              created.  Defaults to the value passed to the :toctree: option.
24
25       -s <suffix>, --suffix <suffix>
26              Default suffix to use for generated files. Defaults to rst.
27
28       -t <templates>, --templates <templates>
29              Custom template directory. Defaults to None.
30
31       -i, --imported-members
32              Document imported members.
33
34       -a, --respect-module-all
35              Document exactly the members in a module’s __all__ attribute.
36

EXAMPLE

38       Given the following directory structure:
39
40          docs
41          ├── index.rst
42          └── ...
43          foobar
44          ├── foo
45          │   └── __init__.py
46          └── bar
47              ├── __init__.py
48              └── baz
49                  └── __init__.py
50
51       and assuming docs/index.rst contained the following:
52
53          Modules
54          =======
55
56          .. autosummary::
57             :toctree: modules
58
59             foobar.foo
60             foobar.bar
61             foobar.bar.baz
62
63       If you run the following:
64
65          $ PYTHONPATH=. sphinx-autogen docs/index.rst
66
67       then the following stub files will be created in docs:
68
69          docs
70          ├── index.rst
71          └── modules
72              ├── foobar.bar.rst
73              ├── foobar.bar.baz.rst
74              └── foobar.foo.rst
75
76       and each of those files will contain a autodoc directive and some other
77       information.
78

SEE ALSO

80       sphinx-build(1), sphinx-apidoc(1)
81
83       2007-2022, Georg Brandl and the Sphinx team
84
85
86
87
884.4.0                            Feb 01, 2022                SPHINX-AUTOGEN(1)
Impressum