reStructuredText custom role to refer PyPI packages.
Description
This is python package to provide features to refer to PyPI in docutils (and more).
Included features:
reStructuredText role
Sphinx extension
Installation
pip install rst-pypi-ref
Usage
When you write :pypi:`rst-pypi-ref` into reStructuredText source, this appends ref to PyPI URL for rst-pypi-ref.
Supporting syntax
Package name only: :pypi:`rst-pypi-ref`
Explicit version: :pypi:`rst-pypi-ref==0.2.0`
Change display text: :pypi:`PyPI Link <rst-pypi-ref>`
There package name in between < and >.
Simple usage
$ echo ':pypi:`rst-pypi-ref`' | python -m rst_pypi_ref.cli
<document source="<stdin>">
<paragraph>
<reference refuri="https://pypi.org/project/rst-pypi-ref">
rst-pypi-ref
With Sphinx
extensions = [
"rst_pypi_ref.sphinx",
]
For other docutils app
In entrypoint (before parse reST source), Call rst_pypi_ref.core.bootstrap.
from rst_pypi_ref.core import bootstrap
bootstrap()
Contibuting
See CONTIBUTING note.
Metadata
Release files for rst-pypi-ref 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rst_pypi_ref-0.4.0.tar.gz | 13.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rst_pypi_ref-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / rst_pypi_ref-0.4.0.tar.gz
| Download URL | rst_pypi_ref-0.4.0.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a9a98b0a38c697190f199a77ac72ad32d4923d6b759763a79443b165b8adb93
|
|
BLAKE2b-256 checksum How to use checksums |
0e2012a92850baaa4e9a0aef02e1a6d77b80e1c1fc567d5a1b5cb9dbc1dd2481
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / rst_pypi_ref-0.4.0-py3-none-any.whl
| Download URL | rst_pypi_ref-0.4.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c252c95379b9d558dcb548e0682f8bcff977fd70e603f330311ee89e301d992c
|
|
BLAKE2b-256 checksum How to use checksums |
180916a062d0987297092e00d4831fff13c472a14ca7c742b646fddda5a3632d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|