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

EXAMPLE

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

SEE ALSO

77       sphinx-build(1), sphinx-apidoc(1)
78
80       2007-2021, Georg Brandl and the Sphinx team
81
82
83
84
854.1.2                            Sep 16, 2021                SPHINX-AUTOGEN(1)
Impressum