webpage2md
A command-line tool to convert HTML files and web pages to Markdown format.
Features
- Convert local HTML files to Markdown
- Convert web pages to Markdown
- Support for multiple input files
- Custom output directory and filename options
- Automatic installation of required dependencies
- Uses Playwright for reliable web scraping
- Uses Pandoc for high-quality HTML to Markdown conversion
Installation
pip install webpage2md
Usage
As a Python Package
from webpage2md import convert_html, convert_url
# Convert HTML string to markdown
html = '<h1>Hello World</h1>'
markdown = convert_html(html)
# Convert webpage to markdown
markdown = convert_url('https://example.com')
Command Line Usage
Basic usage:
webpage2md example.html # Convert local file
webpage2md https://example.com # Convert web page
webpage2md file1.html file2.html # Convert multiple files
Options:
webpage2md -o output_dir/ file.html # Specify output directory
webpage2md -n custom_name.md file.html # Specify output filename
webpage2md --stdout file.html # Print to stdout
webpage2md -q file.html # Quiet mode
webpage2md -v file.html # Verbose mode
For help:
webpage2md --help
Requirements
- Python 3.7+
- Playwright (automatically installed)
- Pandoc (automatically installed)
License
MIT License
Metadata
Release files for webpage2md 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| webpage2md-1.0.0.tar.gz | 11.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| webpage2md-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.3 kB
Release files / webpage2md-1.0.0.tar.gz
| Download URL | webpage2md-1.0.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4870dd9d0fd4305d0b2fe8850752bedb1749104d05df7f52950e3415eac3d280
|
|
BLAKE2b-256 checksum How to use checksums |
5d336f0fa69b6a8715dbb3fbbc2aa5edf84796b2390a0e45d7790947a4000a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / webpage2md-1.0.0-py3-none-any.whl
| Download URL | webpage2md-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
138c9297991bb50473e328345043140df8ee2b7247a62c24a705b7e4436c50f2
|
|
BLAKE2b-256 checksum How to use checksums |
67f71a40b12dbe44622e18780ed748864c32a0647ef61ed1e51ba708ced563ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for webpage2md 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.