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
Release history Release notifications | RSS feed
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.4.0.tar.gz
(5.5 kB
view details)
File details
Details for the file markdownify-0.4.0.tar.gz
.
File metadata
- Download URL: markdownify-0.4.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7cf4787436527a60fdda3311f29b2894e59c148a3a51835d650a747b70b950e2
|
|
MD5 |
9cc76ac885fb601174c7bcabbfce6722
|
|
BLAKE2b-256 |
d0f6b07ee31c7e0c4eb858a1f51419c898d374bca8baff423fc8eb44971af5a9
|