Giter VIP home page Giter VIP logo

python-html2rest's Introduction

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)

python-html2rest's People

Contributors

posativ avatar

Stargazers

zhangxianchao avatar pythonwood avatar glaringgibbon avatar Stanislav Pankevich avatar Alwin Wang avatar Armin Stross-Radschinski avatar Harshad Sharma avatar Matías Agustín Méndez avatar Leonardo J. Caballero G. avatar  avatar Mariano Reingart avatar Ionel Cristian Mărieș avatar Oleksandr avatar Frank Cui avatar onestar avatar Finn avatar Steven Joseph avatar Dale Athanasias avatar Evstifeev Roman avatar Jonathan Barratt avatar Nazeeruddin Ikram avatar Stephan Klinger avatar  avatar  avatar flyabroad avatar Waylan Limberg avatar

Watchers

 avatar James Cloos avatar  avatar

python-html2rest's Issues

Batch conversion?

Thanks for the very useful script.

Is there a way to do batch conversion of HTML files in folders and subfolders?

Thanks,
Mohamed

syntax error in html2rest setup.py?

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

Linked are broken

All links come out as this without any references:

`Contact us to learn more`_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.