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)
Metadata
Release files for html2rest 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | |
|---|---|---|---|
| html2rest-0.2.2.zip | 6.5 kB | Details | |
| html2rest-0.2.2.tar.gz | 5.4 kB | Details |
Release files / html2rest-0.2.2.zip
| Download URL | html2rest-0.2.2.zip |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce5a0dc752a5557b4d1aab3c5c5da3d0e6772236daba9abd4e62da93a9d73d20
|
|
BLAKE2b-256 checksum How to use checksums |
d059b92c04a55e2060cec5da25e370aedf813e1b9ef958b0ff8bd33f37f8b684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / html2rest-0.2.2.tar.gz
| Download URL | html2rest-0.2.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5d989480a27a85777a6b76079e78e6749221c70206877b585c18b760b92a52a
|
|
BLAKE2b-256 checksum How to use checksums |
72516b371ec166ff6ab913c8f4032faa850dff49a105c01e0c1daaee02a1004b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |