rev: 38335a1d1dbf4b6953b1054e3b468a0080ee5240 htmltextconvert/README.rst -rw-r--r-- 827 bytes View raw Log this file
38335a1d1dbfOlly Cope Include example in readme 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
htmltextconvert: HTML to plain text converter
=============================================

htmltextconvert renders HTML to plain text, for example to autogenerate a plain
text versions of HTML emails, or to index HTML documents for search.

It differs from other packages in these ways:

- Pure Python, no dependencies
- High quality, well tested code
- Permissive license (Apache)
- Renders the HTML to text suitable for an text/plain email body (doesn't
  convert to a structured text format such as markdown).


Usage::

    >>> import htmltextconvert
    >>> print(
    ...     htmltextconvert.html_to_text(
    ...         """
    ...         <p>This is a paragraph.</p>
    ...         <p>This is another paragraph.</p>
    ...         """
    ...     )
    ... )
    This is a paragraph

    This is another paragraph