A blazing fast, single-file script to merge dispersed folders of files into a single E-book.
专为松鼠党设计:零依赖痛点,将散乱的 PDF, Images, CBZ, EPUB 智能合并为一本完整的电子书 (EPUB/PDF/MOBI/AZW3)。
- 📚 Dual Modes:
- Comic Mode: Specialized for merging Image folders/CBZs into PDF/EPUB.
- Novel Mode: Intelligent text reflow for merging web novels or chapter files.
- 🖼️ Auto-Cover: Automatically extracts the first page as the cover, or supports custom cover paths.
- 🚀 High Performance: Powered by multi-threading for high-speed image/pdf processing.
- 🔌 Calibre Integration: Uses
ebook-convertfor perfect format rendering (auto-setups on Windows). - 🛠️ Zero Friction: Designed to be run directly with
uv- no manual virtualenv needed.
This project is optimized for uv. You don't need to manually install pip packages.
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -lsSf https://astral.sh/uv/install.sh | shClone the repo and run. uv will automatically sync all dependencies (PyMuPDF, Pillow, etc.) in an isolated environment instantly.
# Run in interactive mode (Interactive Wizard)
uv run 批量电子书整合.pySimply run the script without arguments. Follow the on-screen guide to select your folder, language (En/Zh/Ja), and target format.
uv run 批量电子书整合.pyMerge a Manga folder into a single PDF:
uv run 批量电子书整合.py -p "C:\Comics\OnePiece" -f pdf -m comicMerge Novel chapters with a Custom Cover:
uv run 批量电子书整合.py -p "D:\Novels\Overlord" -f epub -m novel --cover "D:\Novels\Cover.jpg"Batch Process Multiple Folders to Kindle Format:
uv run 批量电子书整合.py -p "C:\Book1" "C:\Book2" -f azw3 -m novelThe internal codebase follows a unique variable naming convention inspired by Honkai Impact 3rd (Elysian Realm) to handle specific tasks:
elysiaFitz: PDF/Document parsing (PyMuPDF).edenImage: Image processing & art (Pillow).kevinConcurrent: Powerful multi-threaded execution.griseoEpub: Constructing the EPUB structure.- ...and other Flame-Chasers ensuring a flawless conversion.