Name | sphinxcontrib-requirements-txt JSON |
Version |
0.0.4
JSON |
| download |
home_page | |
Summary | A sphinx extension to generate a rst/markdown to display the dependencies of a python package from requirement.txt |
upload_time | 2023-09-02 14:34:29 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | GPL v3 |
keywords |
sphinx
myst
requirements.txt
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# sphinxcontrib-requirements-txt
[](https://sphinx-contrib-requirements-txt.readthedocs.io)
[](https://results.pre-commit.ci/latest/github/sphinx-contrib/requirements-txt/main)
[](https://github.com/sphinx-contrib/requirements-txt/actions)
[](https://codecov.io/gh/sphinx-contrib/requirements-txt)
[](https://github.com/sphinx-contrib/requirements-txt/releases)
[](https://github.com/sphinx-contrib/requirements-txt/releases/latest)
[](https://github.com/sphinx-contrib/requirements-txt/issues)
[](https://github.com/sphinx-contrib/requirements-txt/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/sphinx-contrib/requirements-txt/pulls)
[](https://github.com/sphinx-contrib/requirements-txt/pulls?q=is%3Apr+is%3Aclosed)
[](https://github.com/sphinx-contrib/requirements-txt/discussions)
[](https://github.com/sphinx-contrib/requirements-txt/milestones)
[](https://github.com/sphinx-contrib/requirements-txt/network/members)
[](https://github.com/sphinx-contrib/requirements-txt/stargazers)
[](https://github.com/sphinx-contrib/requirements-txt/watchers)
[](https://github.com/sphinx-contrib/requirements-txt/graphs/contributors)
[](https://github.com/sphinx-contrib/requirements-txt/graphs/commit-activity)
[](https://github.com/sphinx-contrib/requirements-txt/commits)
[](https://github.com/sphinx-contrib/requirements-txt/releases/latest)
[](https://github.com/sphinx-contrib/requirements-txt/blob/main/LICENSE)
[](https://github.com/sphinx-contrib/requirements-txt)
[](https://github.com/sphinx-contrib/requirements-txt)
[](https://github.com/sphinx-contrib/requirements-txt)
[](https://github.com/sphinx-contrib/requirements-txt)
[](https://github.com/sphinx-contrib/requirements-txt)
[](https://github.com/sphinx-contrib/requirements-txt)
[](https://pypi.org/project/sphinxcontrib-requirements-txt/#description)
[](https://pypi.org/project/sphinxcontrib-requirements-txt/#history)
[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)
A sphinx extension to generate a rst/markdown to display the dependencies of
a python package from `requirement.txt`.
## Usage
Take MyST as an example. rst is similar.
`requirement.txt`:
````kconfig
# To complete package names, a cache is needed.
# Every time you change template, the cache must be regenerated.
#
# ```shell
# $ pkgbuild-language-server --print-config cache
# /home/wzy/.cache/pacman.json
# ```
pyalpm
# See <https://wiki.archlinux.org/title/Namcap>.
git+git://gitlab.archlinux.org/pacman/namcap
````
`docs/conf.py`:
```python
# ...
extensions = [
"myst_parser",
"sphinxcontrib.requirements_txt",
]
# ...
```
`docs/index.md`:
````markdown
```{requirements} ../requirements.txt
```
````
Then:
```shell
cd docs && sphinx-build . _build/html
cd -
xdg-open docs/_build/html/index.html
```
A generated markdown will be inserted and rendered. You see:

## Customize
````markdown
```{requirements} /the/path/of/requirements.txt
---
title: Dependence
template: /the/path/of/template.j2
---
```
````
- `/the/path/of/requirements.txt` can be a glob expression.
- `title` can contain `{title}`, which will be converted to the base name of
requirement file. Such as `requirements/dev.txt` will be converted to `dev`.
- `template` is a jinja2 file. See [jinja2 syntax](https://docs.jinkan.org/docs/jinja2/templates.html)
and
[examples](https://github.com/sphinx-contrib/requirements-txt/blob/main/src/sphinxcontrib/requirements_txt/assets/jinja2).
## Alternatives
- [sphinxcontrib-eval](https://github.com/sphinx-contrib/eval#generate-requirements-document)
See
[](https://sphinxcontrib-requirements-txt.readthedocs.io)
to know more.
Raw data
{
"_id": null,
"home_page": "",
"name": "sphinxcontrib-requirements-txt",
"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/15/09/86a2e5de277b58d56e379600f21034fab5fc8df1c29e1f60c82041dce8e2/sphinxcontrib-requirements-txt-0.0.4.tar.gz",
"platform": null,
"description": "# sphinxcontrib-requirements-txt\n\n[](https://sphinx-contrib-requirements-txt.readthedocs.io)\n[](https://results.pre-commit.ci/latest/github/sphinx-contrib/requirements-txt/main)\n[](https://github.com/sphinx-contrib/requirements-txt/actions)\n[](https://codecov.io/gh/sphinx-contrib/requirements-txt)\n\n[](https://github.com/sphinx-contrib/requirements-txt/releases)\n[](https://github.com/sphinx-contrib/requirements-txt/releases/latest)\n[](https://github.com/sphinx-contrib/requirements-txt/issues)\n[](https://github.com/sphinx-contrib/requirements-txt/issues?q=is%3Aissue+is%3Aclosed)\n[](https://github.com/sphinx-contrib/requirements-txt/pulls)\n[](https://github.com/sphinx-contrib/requirements-txt/pulls?q=is%3Apr+is%3Aclosed)\n[](https://github.com/sphinx-contrib/requirements-txt/discussions)\n[](https://github.com/sphinx-contrib/requirements-txt/milestones)\n[](https://github.com/sphinx-contrib/requirements-txt/network/members)\n[](https://github.com/sphinx-contrib/requirements-txt/stargazers)\n[](https://github.com/sphinx-contrib/requirements-txt/watchers)\n[](https://github.com/sphinx-contrib/requirements-txt/graphs/contributors)\n[](https://github.com/sphinx-contrib/requirements-txt/graphs/commit-activity)\n[](https://github.com/sphinx-contrib/requirements-txt/commits)\n[](https://github.com/sphinx-contrib/requirements-txt/releases/latest)\n\n[](https://github.com/sphinx-contrib/requirements-txt/blob/main/LICENSE)\n[](https://github.com/sphinx-contrib/requirements-txt)\n[](https://github.com/sphinx-contrib/requirements-txt)\n[](https://github.com/sphinx-contrib/requirements-txt)\n[](https://github.com/sphinx-contrib/requirements-txt)\n[](https://github.com/sphinx-contrib/requirements-txt)\n[](https://github.com/sphinx-contrib/requirements-txt)\n\n[](https://pypi.org/project/sphinxcontrib-requirements-txt/#description)\n[](https://pypi.org/project/sphinxcontrib-requirements-txt/#history)\n[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n[](https://pypi.org/project/sphinxcontrib-requirements-txt/#files)\n\nA sphinx extension to generate a rst/markdown to display the dependencies of\na python package from `requirement.txt`.\n\n## Usage\n\nTake MyST as an example. rst is similar.\n\n`requirement.txt`:\n\n````kconfig\n# To complete package names, a cache is needed.\n# Every time you change template, the cache must be regenerated.\n#\n# ```shell\n# $ pkgbuild-language-server --print-config cache\n# /home/wzy/.cache/pacman.json\n# ```\n\npyalpm\n# See <https://wiki.archlinux.org/title/Namcap>.\ngit+git://gitlab.archlinux.org/pacman/namcap\n````\n\n`docs/conf.py`:\n\n```python\n# ...\nextensions = [\n \"myst_parser\",\n \"sphinxcontrib.requirements_txt\",\n]\n# ...\n```\n\n`docs/index.md`:\n\n````markdown\n```{requirements} ../requirements.txt\n```\n````\n\nThen:\n\n```shell\ncd docs && sphinx-build . _build/html\ncd -\nxdg-open docs/_build/html/index.html\n```\n\nA generated markdown will be inserted and rendered. You see:\n\n\n\n## Customize\n\n````markdown\n```{requirements} /the/path/of/requirements.txt\n---\ntitle: Dependence\ntemplate: /the/path/of/template.j2\n---\n```\n````\n\n- `/the/path/of/requirements.txt` can be a glob expression.\n- `title` can contain `{title}`, which will be converted to the base name of\n requirement file. Such as `requirements/dev.txt` will be converted to `dev`.\n- `template` is a jinja2 file. See [jinja2 syntax](https://docs.jinkan.org/docs/jinja2/templates.html)\n and\n [examples](https://github.com/sphinx-contrib/requirements-txt/blob/main/src/sphinxcontrib/requirements_txt/assets/jinja2).\n\n## Alternatives\n\n- [sphinxcontrib-eval](https://github.com/sphinx-contrib/eval#generate-requirements-document)\n\nSee\n[](https://sphinxcontrib-requirements-txt.readthedocs.io)\nto know more.\n",
"bugtrack_url": null,
"license": "GPL v3",
"summary": "A sphinx extension to generate a rst/markdown to display the dependencies of a python package from requirement.txt",
"version": "0.0.4",
"project_urls": {
"Bug Report": "https://github.com/sphinx-contrib/requirements-txt/issues",
"Download": "https://github.com/sphinx-contrib/requirements-txt/releases",
"Homepage": "https://sphinxcontrib-requirements-txt.readthedocs.io",
"Source": "https://github.com/sphinx-contrib/requirements-txt"
},
"split_keywords": [
"sphinx",
"myst",
"requirements.txt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "caaee795d7562c7514bf1139debba320dc2d6bafea90c132c2665e9dec87f209",
"md5": "cffbd8def186d0496a3e3af73348ca2e",
"sha256": "b312e6ff740407c67b8d79d2b5dcbd8c9109d882bff1cb040e5f585303efd431"
},
"downloads": -1,
"filename": "sphinxcontrib_requirements_txt-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cffbd8def186d0496a3e3af73348ca2e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 18869,
"upload_time": "2023-09-02T14:34:28",
"upload_time_iso_8601": "2023-09-02T14:34:28.048773Z",
"url": "https://files.pythonhosted.org/packages/ca/ae/e795d7562c7514bf1139debba320dc2d6bafea90c132c2665e9dec87f209/sphinxcontrib_requirements_txt-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "150986a2e5de277b58d56e379600f21034fab5fc8df1c29e1f60c82041dce8e2",
"md5": "b6b38db226bd3009cb4ccbd6db7ae5e7",
"sha256": "5375fc48c5b0c6ce0ef232e599ca509ffb986e1ed12269460511eeaeaaeda1e6"
},
"downloads": -1,
"filename": "sphinxcontrib-requirements-txt-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "b6b38db226bd3009cb4ccbd6db7ae5e7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 25570,
"upload_time": "2023-09-02T14:34:29",
"upload_time_iso_8601": "2023-09-02T14:34:29.740735Z",
"url": "https://files.pythonhosted.org/packages/15/09/86a2e5de277b58d56e379600f21034fab5fc8df1c29e1f60c82041dce8e2/sphinxcontrib-requirements-txt-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-02 14:34:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sphinx-contrib",
"github_project": "requirements-txt",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "sphinxcontrib-requirements-txt"
}