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.3.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.3.0
File Size Uploaded
rst2txt-1.3.0.tar.gz 21.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rst2txt 1.3.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

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