From 307f6b4755716b2ff5c48651325005d1c4303ced Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 26 Feb 2018 08:27:07 -0500 Subject: [PATCH] markdown fun Signed-off-by: Kenneth Reitz --- README.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.rst b/README.rst index 72bb363..5931b8d 100644 --- a/README.rst +++ b/README.rst @@ -108,6 +108,29 @@ XPath is also supported: >>> r.html.xpath('a') [] +Other Fun (with Markdown) +========================= + +If you'd like to take an element and convert it to Markdown, for example, use `html2text`, by Aaron Swartz: + +.. code-block:: shell + + $ pipenv install html2text + +.. code-block:: pycon + + >>> from html2text import HTML2Text + >>> h = html2text.HTML2Text() + >>> print(h.handle(about.html)) + * [About](/about/) + + * [Applications](/about/apps/) + * [Quotes](/about/quotes/) + * [Getting Started](/about/gettingstarted/) + * [Help](/about/help/) + * [Python Brochure](http://brochure.getpython.info/) + + Installation ============