sphinxcontrib-autofile


Namesphinxcontrib-autofile JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryA sphinx extension to generate module for many files from a glob expression
upload_time2023-09-02 14:33:29
maintainer
docs_urlNone
author
requires_python>=3.8
licenseGPL v3
keywords sphinx myst requirements.txt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sphinxcontrib-autofile

[![readthedocs](https://shields.io/readthedocs/sphinxcontrib-autofile)](https://sphinx-contrib-requirements-txt.readthedocs.io)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sphinx-contrib/autofile/main.svg)](https://results.pre-commit.ci/latest/github/sphinx-contrib/requirements-txt/main)
[![github/workflow](https://github.com/sphinx-contrib/autofile/actions/workflows/main.yml/badge.svg)](https://github.com/sphinx-contrib/requirements-txt/actions)
[![codecov](https://codecov.io/gh/sphinx-contrib/autofile/branch/main/graph/badge.svg)](https://codecov.io/gh/sphinx-contrib/requirements-txt)

[![github/downloads](https://shields.io/github/downloads/sphinx-contrib/autofile/total)](https://github.com/sphinx-contrib/requirements-txt/releases)
[![github/downloads/latest](https://shields.io/github/downloads/sphinx-contrib/autofile/latest/total)](https://github.com/sphinx-contrib/requirements-txt/releases/latest)
[![github/issues](https://shields.io/github/issues/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/issues)
[![github/issues-closed](https://shields.io/github/issues-closed/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/issues?q=is%3Aissue+is%3Aclosed)
[![github/issues-pr](https://shields.io/github/issues-pr/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/pulls)
[![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/pulls?q=is%3Apr+is%3Aclosed)
[![github/discussions](https://shields.io/github/discussions/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/discussions)
[![github/milestones](https://shields.io/github/milestones/all/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/milestones)
[![github/forks](https://shields.io/github/forks/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/network/members)
[![github/stars](https://shields.io/github/stars/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/stargazers)
[![github/watchers](https://shields.io/github/watchers/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/watchers)
[![github/contributors](https://shields.io/github/contributors/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/graphs/contributors)
[![github/commit-activity](https://shields.io/github/commit-activity/w/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/graphs/commit-activity)
[![github/last-commit](https://shields.io/github/last-commit/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/commits)
[![github/release-date](https://shields.io/github/release-date/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/releases/latest)

[![github/license](https://shields.io/github/license/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/blob/main/LICENSE)
[![github/languages](https://shields.io/github/languages/count/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)
[![github/languages/top](https://shields.io/github/languages/top/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)
[![github/directory-file-count](https://shields.io/github/directory-file-count/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)
[![github/code-size](https://shields.io/github/languages/code-size/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)
[![github/repo-size](https://shields.io/github/repo-size/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)
[![github/v](https://shields.io/github/v/release/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)

[![pypi/status](https://shields.io/pypi/status/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#description)
[![pypi/v](https://shields.io/pypi/v/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#history)
[![pypi/downloads](https://shields.io/pypi/dd/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
[![pypi/format](https://shields.io/pypi/format/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
[![pypi/implementation](https://shields.io/pypi/implementation/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
[![pypi/pyversions](https://shields.io/pypi/pyversions/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)

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`:

```python
# ...
extensions = [
    "myst_parser",
    "sphinxcontrib.autofile",
]
# ...
```

`docs/index.md`:

````markdown
```{autofile} ../src/sphinxcontrib/autofile/*.py
:members:
```
````

It will be translated to

````markdown
```{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

````markdown
```{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](https://docs.jinkan.org/docs/jinja2/templates.html).
  See
  [examples](https://github.com/sphinx-contrib/autofile/tree/main/src/sphinxcontrib/autofile/assets/jinja2).

## Alternatives

- [sphinxcontrib-eval](https://github.com/sphinx-contrib/eval#generate-api-document)

See
[![readthedocs](https://shields.io/readthedocs/sphinxcontrib-autofile)](https://sphinxcontrib-requirements-txt.readthedocs.io)
to know more.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sphinxcontrib-autofile",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "sphinx,myst,requirements.txt",
    "author": "",
    "author_email": "Wu Zhenyu <wuzhenyu@ustc.edu>",
    "download_url": "https://files.pythonhosted.org/packages/94/a0/8109bb97dcd8fea9fc4aa51ac05b632e18da2883f225ef0978a5d9fa373b/sphinxcontrib-autofile-0.0.2.tar.gz",
    "platform": null,
    "description": "# sphinxcontrib-autofile\n\n[![readthedocs](https://shields.io/readthedocs/sphinxcontrib-autofile)](https://sphinx-contrib-requirements-txt.readthedocs.io)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sphinx-contrib/autofile/main.svg)](https://results.pre-commit.ci/latest/github/sphinx-contrib/requirements-txt/main)\n[![github/workflow](https://github.com/sphinx-contrib/autofile/actions/workflows/main.yml/badge.svg)](https://github.com/sphinx-contrib/requirements-txt/actions)\n[![codecov](https://codecov.io/gh/sphinx-contrib/autofile/branch/main/graph/badge.svg)](https://codecov.io/gh/sphinx-contrib/requirements-txt)\n\n[![github/downloads](https://shields.io/github/downloads/sphinx-contrib/autofile/total)](https://github.com/sphinx-contrib/requirements-txt/releases)\n[![github/downloads/latest](https://shields.io/github/downloads/sphinx-contrib/autofile/latest/total)](https://github.com/sphinx-contrib/requirements-txt/releases/latest)\n[![github/issues](https://shields.io/github/issues/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/issues)\n[![github/issues-closed](https://shields.io/github/issues-closed/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/issues?q=is%3Aissue+is%3Aclosed)\n[![github/issues-pr](https://shields.io/github/issues-pr/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/pulls)\n[![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/pulls?q=is%3Apr+is%3Aclosed)\n[![github/discussions](https://shields.io/github/discussions/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/discussions)\n[![github/milestones](https://shields.io/github/milestones/all/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/milestones)\n[![github/forks](https://shields.io/github/forks/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/network/members)\n[![github/stars](https://shields.io/github/stars/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/stargazers)\n[![github/watchers](https://shields.io/github/watchers/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/watchers)\n[![github/contributors](https://shields.io/github/contributors/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/graphs/contributors)\n[![github/commit-activity](https://shields.io/github/commit-activity/w/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/graphs/commit-activity)\n[![github/last-commit](https://shields.io/github/last-commit/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/commits)\n[![github/release-date](https://shields.io/github/release-date/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/releases/latest)\n\n[![github/license](https://shields.io/github/license/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt/blob/main/LICENSE)\n[![github/languages](https://shields.io/github/languages/count/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)\n[![github/languages/top](https://shields.io/github/languages/top/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)\n[![github/directory-file-count](https://shields.io/github/directory-file-count/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)\n[![github/code-size](https://shields.io/github/languages/code-size/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)\n[![github/repo-size](https://shields.io/github/repo-size/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)\n[![github/v](https://shields.io/github/v/release/sphinx-contrib/autofile)](https://github.com/sphinx-contrib/requirements-txt)\n\n[![pypi/status](https://shields.io/pypi/status/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#description)\n[![pypi/v](https://shields.io/pypi/v/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#history)\n[![pypi/downloads](https://shields.io/pypi/dd/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n[![pypi/format](https://shields.io/pypi/format/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n[![pypi/implementation](https://shields.io/pypi/implementation/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n[![pypi/pyversions](https://shields.io/pypi/pyversions/sphinxcontrib-autofile)](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n\nA sphinx extension to generate module for many files from a glob expression.\n\n## Usage\n\nTake MyST as an example. rst is similar.\n\n`docs/conf.py`:\n\n```python\n# ...\nextensions = [\n    \"myst_parser\",\n    \"sphinxcontrib.autofile\",\n]\n# ...\n```\n\n`docs/index.md`:\n\n````markdown\n```{autofile} ../src/sphinxcontrib/autofile/*.py\n:members:\n```\n````\n\nIt will be translated to\n\n````markdown\n```{eval-rst}\n.. automodule:: sphinxcontrib.autofile\n    :members:\n\n.. automodule:: sphinxcontrib.autofile.directive\n    :members:\n\n... (more modules)\n```\n````\n\nWhen your modules is too many, it will save your time.\n\n## Customize\n\n````markdown\n```{autofile} ../src/sphinxcontrib/autofile/*.py\n:prefix: your_prefix\n:template: /the/path/of/your/template\n```\n````\n\n- `prefix`: If you don't use src-layout, change it.\n- `template`: template use\n  [jinja syntax](https://docs.jinkan.org/docs/jinja2/templates.html).\n  See\n  [examples](https://github.com/sphinx-contrib/autofile/tree/main/src/sphinxcontrib/autofile/assets/jinja2).\n\n## Alternatives\n\n- [sphinxcontrib-eval](https://github.com/sphinx-contrib/eval#generate-api-document)\n\nSee\n[![readthedocs](https://shields.io/readthedocs/sphinxcontrib-autofile)](https://sphinxcontrib-requirements-txt.readthedocs.io)\nto know more.\n",
    "bugtrack_url": null,
    "license": "GPL v3",
    "summary": "A sphinx extension to generate module for many files from a glob expression",
    "version": "0.0.2",
    "project_urls": {
        "Bug Report": "https://github.com/sphinx-contrib/autofile/issues",
        "Download": "https://github.com/sphinx-contrib/autofile/releases",
        "Homepage": "https://sphinxcontrib-autofile.readthedocs.io",
        "Source": "https://github.com/sphinx-contrib/autofile"
    },
    "split_keywords": [
        "sphinx",
        "myst",
        "requirements.txt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "adaa78c2b3b06687d4af800fd280b2a21cef358773c672b45378b751b557bf44",
                "md5": "3aa5a2626eb0fded0eb2b9010d18259c",
                "sha256": "b5d3df354080de635e41f57247829b01097be74e44f4fcd0ebe0f9b3a981a00f"
            },
            "downloads": -1,
            "filename": "sphinxcontrib_autofile-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3aa5a2626eb0fded0eb2b9010d18259c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18063,
            "upload_time": "2023-09-02T14:33:28",
            "upload_time_iso_8601": "2023-09-02T14:33:28.330346Z",
            "url": "https://files.pythonhosted.org/packages/ad/aa/78c2b3b06687d4af800fd280b2a21cef358773c672b45378b751b557bf44/sphinxcontrib_autofile-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94a08109bb97dcd8fea9fc4aa51ac05b632e18da2883f225ef0978a5d9fa373b",
                "md5": "3afacf45aaba97663ef31ea502dfc71c",
                "sha256": "5ac1b17f04b86106ec2c524c9e511ec746754c6bcdf50c2a82e2268b5f20e864"
            },
            "downloads": -1,
            "filename": "sphinxcontrib-autofile-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3afacf45aaba97663ef31ea502dfc71c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 24163,
            "upload_time": "2023-09-02T14:33:29",
            "upload_time_iso_8601": "2023-09-02T14:33:29.937400Z",
            "url": "https://files.pythonhosted.org/packages/94/a0/8109bb97dcd8fea9fc4aa51ac05b632e18da2883f225ef0978a5d9fa373b/sphinxcontrib-autofile-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-02 14:33:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sphinx-contrib",
    "github_project": "autofile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "sphinxcontrib-autofile"
}
        
Elapsed time: 0.11816s