CBZ Editor is a powerful and user-friendly command-line tool designed for processing and managing CBZ (Comic Book Zip) files. It offers a seamless way to extract, rename, and organize images from CBZ files, while also generating the necessary ComicInfo.xml metadata for comic book readers. Whether you're working with single issues or entire volumes, CBZ Editor simplifies your workflow, making it easy to manage and structure your comic archives.
- Process CBZ Files: Automatically extract, rename, and organize images from CBZ archives.
- Custom Metadata Creation: Generate a
ComicInfo.xmlfile containing detailed information about the volume, series, writer, and more. - Cover Image Handling: Optionally replace or prepend
title.jpgas the cover image. - Additional Image Support: Includes handling for extra images such as
p(n).jpgbefore or after CBZ file extraction. - Interactive and Command-Line Modes: Run interactively or provide all commands through a simple CLI.
- Directory Management: Automatically creates and manages necessary directories (
cbz,temp). - Combine Processed Images into CBZ: Combine extracted images into a new CBZ archive after processing.
- Optional File Cleanup: Move original files to a temporary directory after processing, keeping your workspace clean.
You can install CBZ Editor by cloning the repository and installing it using pip:
git clone https://github.com/SchmidtiTv/cbz_editor
cd cbz_editor
pip install -e .- Python 3.6 or higher
- Required Python packages (automatically installed with
pip):clicktqdm
CBZ Editor provides a simple command-line interface (CLI) for initializing and processing CBZ files. The primary commands are init and process.
Before processing any CBZ files, you need to initialize the project using the init command:
cbz_editor init- What it does:
- Creates the necessary
cbzandtempdirectories (if they don’t exist). - Prompts you for the series name and writer name (optional).
- Saves this information in an XML file (
config.xml) for future use.
- Creates the necessary
After initialization, you can process CBZ files with the process command. This extracts the images from the CBZ files, renames them sequentially, and creates a new CBZ file along with a ComicInfo.xml.
cbz_editor process <volume_number> [--move-originals]-
Example:
cbz_editor process 2
-
Optional Flag:
--move-originals: Move the original CBZ files and images to a temporary directory after processing.
-
What it does:
- Reads and processes all CBZ files in the
cbzdirectory. - Extracts images, handles additional images like
title.jpgorp(n).jpg, and renames them. - Generates
ComicInfo.xmlwith metadata such as the series name, volume number, page count, and writer. - Optionally combines the processed images into a new CBZ file.
- Optionally moves the original files to a temp folder.
- Reads and processes all CBZ files in the
-
Step 1: Initialize the project:
cbz_editor init
This creates the necessary directories and prompts for the series and writer name.
-
Step 2: Add your CBZ files to the
cbzdirectory. -
Step 3: Optionally, add a
title.jpgand any extra images (p(n).jpg) to thecbzdirectory. -
Step 4: Process the CBZ files for a specific volume:
cbz_editor process 1 --move-originals
This extracts and renames the images, generates the
ComicInfo.xml, creates a new combined CBZ, and moves the original files to thetempdirectory. -
Step 5: Find the renamed images and the
ComicInfo.xmlfile in the output directory.
CBZ Editor is open-source software licensed under the MIT License. See the LICENSE file for full details.
Contributions are welcome! Feel free to open issues for bugs, suggest new features, or submit pull requests. Your feedback helps make CBZ Editor better for everyone.