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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
html2rest-0.2.2.zip
(6.5 kB
view details)
html2rest-0.2.2.tar.gz
(5.4 kB
view details)
File details
Details for the file html2rest-0.2.2.zip
.
File metadata
- Download URL: html2rest-0.2.2.zip
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5a0dc752a5557b4d1aab3c5c5da3d0e6772236daba9abd4e62da93a9d73d20 |
|
MD5 | 04a4d334c90445588117704ca2409462 |
|
BLAKE2b-256 | d059b92c04a55e2060cec5da25e370aedf813e1b9ef958b0ff8bd33f37f8b684 |
File details
Details for the file html2rest-0.2.2.tar.gz
.
File metadata
- Download URL: html2rest-0.2.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5d989480a27a85777a6b76079e78e6749221c70206877b585c18b760b92a52a |
|
MD5 | e5fc78ce17cf1d8d29592862995f03bb |
|
BLAKE2b-256 | 72516b371ec166ff6ab913c8f4032faa850dff49a105c01e0c1daaee02a1004b |