Skip to main content

A set of utilities both library and cli to deal with CBZ files

Project description

This project is licensed under the GNU Lesser General Public License version 3.0 (LGPL-3.0). See LICENSE.txt for the full license text. Also check out licenses of vendored items inside the licenses folder.

CBZ Utilities

This is both a library and a command line tool to deal with CBZ files. It can perform different functions in relation to it. Its mostly a hobby project that was born out of need.

Features

  • Merging CBZ files
  • Auto generating a basic cover
  • Automatic Logical Ordering of input files

Install

To install the latest stable release, simply run the following

pip install cbzutils

or if you have pipx

pipx install cbzutils

then you can access it via the command line as cbzutils if its added to your PATH during install properly.

To clone and run this project

uv sync
uv tool install .

To provide contributions and install the project in editable mode

uv sync
uv tool install . -e

How to use

usage: cbzutils merge [-h] [-o FILE] [-s {default,namenum}] [-d] [--no-cover] [-t TITLE] [-T SUBTITLE] files [files ...]

positional arguments:
  files                 Path to all cbz files

options:
  -h, --help            show this help message and exit
  -o, --out FILE        Output file
  -s, --sort-key {default,namenum}
                        Sort key to sort names, by default uses a smart name num sort
  -d, --dry-run         Doesn't actually does the compression and instead prints the list of chapters in the order they shall be put according to the provided sort key
  --no-cover            Don't add automatically generated cover. Useful for chapters or volumes which already have a cover
  -t, --title TITLE     The title of the file for the cover, defaults to output file name
  -T, --subtitle SUBTITLE
                        The subtitle of the file for the cover, defaults to empty string

Here are a few examples. Suppose you have the following files in a folder

Chap 1.cbz
Chap 2.cbz
Chap 3.cbz
Chap 3.5.cbz
Chap 4.cbz

first cd into that folder

cd path/to/the/folder

and then you can run the following command

cbzutils merge Chap* -d

This will print a list of chapters and the order in which they shall be merged, be sure to check it. Please report any bugs to the github repository so the ordering can be fixed in special cases. But if the ordering is messed up, in the meanwhile, try renaming the files in a consistent manner like presented above. (Cbzutils itself is designed to work out of the box with all sorts of inconsistent file naming schemes).

Then to actually merge, run the following

cbzutils merge Chap* -o MyComic.cbz --title "MyComic" --subtitle "Ch 1-4"

This will produce an output cbz file named MyComic.cbz, you can now conver this file into other desired formats using Callibre, a free books management software.

Contribution Guidelines

  • Please format your code using black and isort before opening a PR.
  • All PRs introducing major changes should be accompanies by an Issue. Please discuss inside the Issue before going ahead and making changes.
  • Small changes regarding documentation and such can be made directly without an associated Issue

Thank you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cbzutils-0.1.1.tar.gz (100.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cbzutils-0.1.1-py3-none-any.whl (89.3 kB view details)

Uploaded Python 3

File details

Details for the file cbzutils-0.1.1.tar.gz.

File metadata

  • Download URL: cbzutils-0.1.1.tar.gz
  • Upload date:
  • Size: 100.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"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}

File hashes

Hashes for cbzutils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c8d6889f29bbfd42f9e7be0e033d8436cf31b995cdc392d3227ef4e88e75e84
MD5 72d210261060777baaf3b3f8fb379238
BLAKE2b-256 927bcd55e768d9a7c8fffb4395e68136bb69c003f7f451d7b3ef76082be1d6f3

See more details on using hashes here.

File details

Details for the file cbzutils-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cbzutils-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 89.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"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}

File hashes

Hashes for cbzutils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da2d597efe924716cf148c08341c1ce5006bac12ea0de90eb1412189db706175
MD5 c58b500174ea5324c5114ec5ede6240d
BLAKE2b-256 32f7df697b64814cb2eefc9e231fce5331bd36404d0f30d9b823ee8dd9ae689b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page