rst2txt
reStructuredText is pretty-damn consumable in its raw form, but extensive use of directives and roles can hamper things or leave the document incomplete in its raw form (cough, .. include, cough).
rst2txt allows you to work around this by evaluating the reStructuredText source and stripping it of most of its formatting. The end result is a document that’s more readable and has elements that don’t make sense in a plain text document, such as images, stripped.
rst2txt is based on the sphinx.writer.text.TextWriter writer used by Sphinx’s TextBuilder but with the Sphinx-specific features stripped out.
Installation
rst2txt is available on PyPI. To install, run:
$ pip install --user rst2txt
Usage
Most users will want just the rst2txt application:
$ rst2txt README.rst
It is also possible to call this programmatically though. This can be useful for things like consuming README files:
from docutils.core import publish_file
import rst2txt
with open('README.rst', 'r') as source:
publish_file(source=source, destination_path='README.txt',
writer=rst2txt.Writer())
Metadata
Release files for rst2txt 1.3.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 | |
|---|---|---|---|
| rst2txt-1.3.0.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rst2txt-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.7 kB
Release files / rst2txt-1.3.0.tar.gz
| Download URL | rst2txt-1.3.0.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66852caf58b7a5cbf8503b866d08f9175b98d6a870bda9cb882afae3239903de
|
|
BLAKE2b-256 checksum How to use checksums |
78fc46caaf5c61858b8fbbc7b99571e9ace5dac03f1e1c6a5290372926743c40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / rst2txt-1.3.0-py3-none-any.whl
| Download URL | rst2txt-1.3.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3b75a3dd0e392aee030f988d3b243bf291df10c2bc7b98983fc4543f4830a29
|
|
BLAKE2b-256 checksum How to use checksums |
d0633b82480e53739495ac4b9848ed2d636cb52bd8d2aae42c1bbfccb444c453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log