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.
This project uses Python 3.12+.
uv sync
uv run docs2epub --helpuvx 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# 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"- Add additional discovery strategies:
sitemap.xml, sidebar parsing, and explicit link lists. - Optional: send-to-kindle (email), once Gmail auth is set up.