Web to Markdown
A Python library for crawling web pages and converting them to markdown format. This tool helps you easily convert web documentation, blogs, or any web content into clean markdown files while preserving the content structure.
Features
- Depth-limited web crawling
- Domain/path boundary respect
- Smart content extraction using readability-lxml
- Clean HTML to Markdown conversion
- Metadata extraction
- Command-line interface with configurable options
Installation
pip install web-to-markdown
Usage
Command Line Interface
# Basic usage
web-to-markdown -u https://example.com/docs -o output.md
# Specify crawl depth
web-to-markdown -u https://example.com/docs -d 2 -o output.md
# Enable verbose logging
web-to-markdown -u https://example.com/docs -v
Python API
from web_to_markdown import WebCrawler, MarkdownConverter
# Initialize crawler
crawler = WebCrawler(base_url="https://example.com/docs", max_depth=3)
# Crawl pages
pages = crawler.crawl()
# Convert to markdown
converter = MarkdownConverter()
markdown_content = converter.convert_to_markdown(pages)
# Save the result
converter.save_markdown(markdown_content, "output.md")
Command Line Options
-u, --url: Base URL to crawl (required)-d, --depth: Maximum crawl depth (default: 3)-o, --output: Output markdown file path (default: output.md)-v, --verbose: Enable verbose logging
Dependencies
- beautifulsoup4
- requests
- urllib3
- markdown
- readability-lxml
- html2text
License
MIT License
Metadata
Release files for web-to-markdown 0.1.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 | |
|---|---|---|---|---|
| web_to_markdown-0.1.0.tar.gz | 6.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| web_to_markdown-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / web_to_markdown-0.1.0.tar.gz
| Download URL | web_to_markdown-0.1.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4a8a8e195f32a919d799d67265953c60af26def8405480cf95b217cd1d51bcf
|
|
BLAKE2b-256 checksum How to use checksums |
de2768a1d4f84a611d45de11161ded883ccbfd0ebe211cfb525d384c27b1c17e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / web_to_markdown-0.1.0-py3-none-any.whl
| Download URL | web_to_markdown-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
894f35eda41cda35a31d7f0ede9669f9973dafde4f7cd6bc4dddba9fac52bd75
|
|
BLAKE2b-256 checksum How to use checksums |
60e7cbc0672d5ffdfc04fb4f46b326d2fafede58b8babeec6e7c4f029957b8d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for web-to-markdown 0.1.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.