Skip to main content

Convert HTML to markdown.

Project description

Installation

pip install markdownify

Usage

Convert some HTML to Markdown:

from markdownify import markdownify as md
md('<b>Yay</b> <a href="http://github.com">GitHub</a>')  # > '**Yay** [GitHub](http://github.com)'

Specify tags to exclude (blacklist):

from markdownify import markdownify as md
md('<b>Yay</b> <a href="http://github.com">GitHub</a>', strip=['a'])  # > '**Yay** GitHub'

...or specify the tags you want to include (whitelist):

from markdownify import markdownify as md
md('<b>Yay</b> <a href="http://github.com">GitHub</a>', convert=['b'])  # > '**Yay** GitHub'

Development

To run tests:

python setup.py test

To lint:

python setup.py lint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdownify-0.3.0.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file markdownify-0.3.0.tar.gz.

File metadata

  • Download URL: markdownify-0.3.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for markdownify-0.3.0.tar.gz
Algorithm Hash digest
SHA256 970afc0fc1e55de697e6de8aca604c7cf00efa2cd9422d2a5ecf3fd04c92fbd7
MD5 b72b65ff7e0c5b06bc78797b2b2bc820
BLAKE2b-256 8a1520e37b0b0a71dacd23fa7da96986dc98f5ab2cab6195f35b72a87d351300

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page