docs2epub
Turn documentation sites into an EPUB (Kindle-friendly).
Initial focus: Docusaurus sites that expose a Next button (docs navigation).
When multiple scraped pages link to each other, docs2epub rewrites those links to stay inside the generated EPUB.
Install (dev)
This project uses Python 3.12+.
uv sync
uv run docs2epub --help
Usage
uvx (no install)
EPUB2 uses an existing pandoc on your PATH when available. Otherwise,
docs2epub automatically downloads Pandoc 3.12.1 from its official GitHub release,
verifies the archive's SHA-256 checksum, and caches the native executable for
future runs. No separate Homebrew or system installation is required.
The first EPUB2 run needs internet access; subsequent runs reuse the cache.
Automatic installation supports macOS and Linux on Intel/AMD 64-bit and ARM64,
and Windows on Intel/AMD 64-bit. Other platforms can install Pandoc manually
or use --format epub3, which uses ebooklib without downloading Pandoc.
Set DOCS2EPUB_CACHE_DIR to override the default OS user cache directory.
uvx docs2epub \
https://www.techinterviewhandbook.org/software-engineering-interview-guide/ \
tech-interview-handbook.epub
# Optional (override inferred metadata)
uvx docs2epub \
https://www.techinterviewhandbook.org/software-engineering-interview-guide/ \
tech-interview-handbook.epub \
--title "Tech Interview Handbook" \
--author "Yangshun Tay"
# Optional: skip images
uvx docs2epub \
https://www.techinterviewhandbook.org/software-engineering-interview-guide/ \
tech-interview-handbook.epub \
--no-images
Docusaurus “Next” crawl
# Default output is EPUB2 (Kindle-friendly) via pandoc
uv run docs2epub \
--start-url "https://www.techinterviewhandbook.org/software-engineering-interview-guide/" \
--out "dist/tech-interview-handbook.epub" \
--title "Tech Interview Handbook" \
--author "Yangshun Tay"
# Optional: build EPUB3 (ebooklib)
uv run docs2epub \
--format epub3 \
--start-url "https://www.techinterviewhandbook.org/software-engineering-interview-guide/" \
--out "dist/tech-interview-handbook.epub" \
--title "Tech Interview Handbook" \
--author "Yangshun Tay"
Roadmap
- Add additional discovery strategies:
sitemap.xml, sidebar parsing, and explicit link lists. - Optional: send-to-kindle (email), once Gmail auth is set up.
Metadata
Release files for docs2epub 0.1.15
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 | Actions |
|---|---|---|---|---|
| docs2epub-0.1.15.tar.gz | 62.8 kB | Without provenance | Details for docs2epub-0.1.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docs2epub-0.1.15-py3-none-any.whl | Python 3 | none | any | Details for docs2epub-0.1.15-py3-none-any.whl |
Total release size: 82.0 kB
Release files / docs2epub-0.1.15.tar.gz
| Download URL | docs2epub-0.1.15.tar.gz |
|---|---|
| Size | 62.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46ef44e2834b8638e095b3c55f133605a17e43cbbe6ab69b8b22c93abcc1d6fd
|
|
BLAKE2b-256 checksum How to use checksums |
0160d57b6145a25191bbe9633e3ed8e8891ca464a6331e8375ef5dc923644ffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / docs2epub-0.1.15-py3-none-any.whl
| Download URL | docs2epub-0.1.15-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
066deac784ae15da373de06e7045118e2424b14916c151196be7784e8ca7ab7f
|
|
BLAKE2b-256 checksum How to use checksums |
5da218a2e094ff3e44bd620148f87d18210e0b2226ae53636e23813b6b15bd38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for docs2epub 0.1.15
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.