Skip to main content

rst2txt

PyPi Status Build Status

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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rst2txt 1.2.0
File Size Uploaded
rst2txt-1.2.0.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rst2txt 1.2.0
File Interpreter ABI Platform
rst2txt-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / rst2txt-1.2.0.tar.gz

Download URL rst2txt-1.2.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d3f2cfa9fc4afdc6c8ea88a1a6157077915f723c92d48618bd2690b813f19e2f
BLAKE2b-256 checksum
How to use checksums
c4303a1c78f704ba30ef7ef9eed2987113b4ffec0d160ec1f23461e64545c174
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

Release files / rst2txt-1.2.0-py3-none-any.whl

Download URL rst2txt-1.2.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94c6de0c686ef3dca0abb3baccb7d93473d15e6263728ffaddfa53d160e04ef1
BLAKE2b-256 checksum
How to use checksums
14ef100879fc59863b65ee71d03ee61e77c888d10544a871918cefc168cfb23c
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

Release history Release notifications | RSS feed

1.3.0

2 release files

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page