A Python tool for splitting manga volume pages into separate chapter folders based on table of contents page numbers.
When scanning or downloading manga volumes, all pages come in a single folder. This tool helps organize them into individual chapter folders by using the table of contents (ToC) page numbers as reference.
- Single volume mode - Process one volume at a time
- Batch mode - Process multiple volumes of a series with continuous chapter numbering
- Auto-detection - Automatically finds volume folders matching
Volume X/Vol Xpattern - Offset calculation - Calculates difference between ToC page numbers and actual filenames
- Visual preview - Generates a grid image of chapter covers for verification before splitting
- Sequential renaming - Optionally renames files to sequential numbers within each chapter
- Safe operation - Copies files instead of moving them, preserving originals
pip install Pillow
python split_chapters.py <manga_folder>On startup, choose between:
- Mode 1 - Single volume processing
- Mode 2 - Batch processing (multiple volumes)
python split_chapters.py "D:/Manga/One Piece/Vol 1"Prompts:
- Chapter starting pages - Comma-separated page numbers from the ToC
- Supports ranges:
1,15-20,30
- Supports ranges:
- First chapter filename - The actual filename of the first chapter's first page (e.g.,
005.png) - First chapter number - The chapter number to start from (e.g.,
1) - Sequential rename - Choose to rename files sequentially or keep original names
Output:
Vol 1/
001/ # Chapter 1
001.png
002.png
...
002/ # Chapter 2
001.png
002.png
...
python split_chapters.py "D:/Manga/One Piece"Expected folder structure:
One Piece/
Volume 1/
Volume 2/
Volume 3/
Prompts:
- First chapter number - Starting chapter for the entire series (e.g.,
1) - Per-volume prompts - For each volume:
- Chapter starting pages from ToC
- First chapter filename
- Sequential rename option
Output:
One Piece/
Volume 1/ # source (unchanged)
Volume 2/ # source (unchanged)
chapters/ # output (new)
001/ # Vol 1, Ch.1
002/ # Vol 1, Ch.2
...
011/ # Vol 2, Ch.11
012/ # Vol 2, Ch.12
...
Chapter numbering continues across volumes automatically.
ToC pages typically start from page 1 (cover, credits, etc.), but actual filenames may differ:
| ToC Page | Actual Filename | Offset |
|---|---|---|
| 1 | 001.png | 0 |
| 3 | 005.png | 2 |
The tool calculates this automatically when you provide the first chapter's filename.
PNG, JPG, JPEG, WebP, BMP, GIF