A sphinx extension to generate module for many files from a glob expression
Project description
sphinxcontrib-autofile
A sphinx extension to generate module for many files from a glob expression.
Usage
Take MyST as an example. rst is similar.
docs/conf.py
:
# ...
extensions = [
"myst_parser",
"sphinxcontrib.autofile",
]
# ...
docs/index.md
:
```{autofile} ../src/sphinxcontrib/autofile/*.py
:members:
```
It will be translated to
```{eval-rst}
.. automodule:: sphinxcontrib.autofile
:members:
.. automodule:: sphinxcontrib.autofile.directive
:members:
... (more modules)
```
When your modules is too many, it will save your time.
Customize
```{autofile} ../src/sphinxcontrib/autofile/*.py
:prefix: your_prefix
:template: /the/path/of/your/template
```
prefix
: If you don't use src-layout, change it.template
: template use jinja syntax. See examples.
Alternatives
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sphinxcontrib-autofile-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc3170049f55bd5991601077162f3879916522282a6675cb8d2939362f8dd37b |
|
MD5 | bf9a75e9a06ec38bf65a56baff83e520 |
|
BLAKE2b-256 | 9cb4d6f5a3cdafa0c847531b4c582df58aa81cae39dc17405aedb6a60d6aceb7 |
Close
Hashes for sphinxcontrib_autofile-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 665045b18e2a6da0270686b044ebf522cb6c03f2e11ead505579aebd6b0c5a4f |
|
MD5 | 96c05128dd3c7706b4eaa0b5023d1330 |
|
BLAKE2b-256 | 85a8355dc36f7fccc7ec37dd63098e5bba9aa68772b3b25e0fee920e6de23b64 |