Skip to main content

A sphinx extension to generate module for many files from a glob expression

Project description

sphinxcontrib-autofile

readthedocs pre-commit.ci status github/workflow codecov

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

pypi/status pypi/v pypi/downloads pypi/format pypi/implementation pypi/pyversions

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

See readthedocs to know more.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinxcontrib-autofile-0.0.2.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

sphinxcontrib_autofile-0.0.2-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file sphinxcontrib-autofile-0.0.2.tar.gz.

File metadata

File hashes

Hashes for sphinxcontrib-autofile-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5ac1b17f04b86106ec2c524c9e511ec746754c6bcdf50c2a82e2268b5f20e864
MD5 3afacf45aaba97663ef31ea502dfc71c
BLAKE2b-256 94a08109bb97dcd8fea9fc4aa51ac05b632e18da2883f225ef0978a5d9fa373b

See more details on using hashes here.

File details

Details for the file sphinxcontrib_autofile-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinxcontrib_autofile-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b5d3df354080de635e41f57247829b01097be74e44f4fcd0ebe0f9b3a981a00f
MD5 3aa5a2626eb0fded0eb2b9010d18259c
BLAKE2b-256 adaa78c2b3b06687d4af800fd280b2a21cef358773c672b45378b751b557bf44

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page