averagehuman / python-html2rest Goto Github PK
View Code? Open in Web Editor NEWConvert HTML to reStructuredText
License: BSD 3-Clause "New" or "Revised" License
Convert HTML to reStructuredText
License: BSD 3-Clause "New" or "Revised" License
html2rest.py ============ 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)
Thanks for the very useful script.
Is there a way to do batch conversion of HTML files in folders and subfolders?
Thanks,
Mohamed
I get continual syntax errors on this line when trying to install html2rest:
print "running setup for html2rest version %s" % version
it seems to choke on the 2nd quotation mark.
Running Python34 under cygwin 2.8
using pip install html2rest
Hi, I have HTML docs and trying to use your tool to convert it to rst. Unfortunately it just skips the images.
All links come out as this without any references:
`Contact us to learn more`_
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.