Skip to main content

Convert HTML to restructuredText

Project description

Convert HTML to restructuredText. Very limited, but intended as a “50%” tool, to be followed by manual editing.

Install

easy_install html2rest

Or:

pip install html2rest

Usage

From the command line:

html2rest http://sphinx.pocoo.org/templating.html > templating.rst

Or programmatically:

from html2rest import html2rest

stream = StringIO()

html2rest('<ul><li>one</li><li>two</li></ul>', writer=stream)

Specify input encoding (default is ‘utf8’) and a preprocessor:

def strip_chars(html):
    return html.replace('¶', '')

html2rest(html, writer=stream, encoding='latin1', preprocess=strip_chars)

Project details


Release history Release notifications

This version
History Node

0.2.2

History Node

0.2.1

History Node

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
html2rest-0.2.2.tar.gz (5.4 kB) Copy SHA256 hash SHA256 Source None Sep 9, 2012
html2rest-0.2.2.zip (6.5 kB) Copy SHA256 hash SHA256 Source None Sep 9, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page