Skip to main content

CLI to search and download manga chapters -> exported to CBZ.

Project description

KizamuManga

๐Ÿ“š KizamuManga State License

KizamuManga is a command-line tool to search, download, and convert manga chapters into CBZ files from different online sources.

โœจ Main Features

  • ๐Ÿ”Ž Interactive search for manga and chapter selection directly from the terminal.
  • โšก Asynchronous downloads with concurrency control, automatic CBZ export, and cleanup of temporary files.
  • ๐Ÿ–ผ๏ธ Optional image processing: grayscale conversion, margin cropping, and proportional resizing.
  • ๐ŸŒ Multi-source support (WeebCentral, InManga, and LeerMangaEsp) with an extensible scraping system based on Playwright.
  • ๐Ÿ“Š Progress indicators and rotating logs for easy tracking of execution.

โšก Quick Start

  1. Install the program package via pip
pip install kizamu-manga
  1. Install the playwright browsers
playwright install
  1. start searching or installing a manga
kizamumanga search "One Piece"
kizamumanga install "One Piece"

๐Ÿงพ Requirements

  • Python 3.9 or higher.
  • Dependencies listed in requirements.txt.
  • Playwright installed along with its browsers (playwright install).
  • Access to the supported websites to fetch online chapters.

โš™๏ธ Installation

Option 1: Install from PyPI (recommended)

If you just want to use the tool:

pip install kizamu-manga
playwright install

Option 2: Install from source (for developers)

# Clone the repository
git clone https://github.com/<your-user>/kizamu-manga.git
cd kizamu-manga

# (Optional) Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate   # Linux/Mac
.venv\Scripts\activate      # Windows

# Install dependencies and the package in editable mode
pip install -e .

# Install Playwright browsers
playwright install

Now you can run the tool directly using the kizamumanga command or:

python -m kizamumanga.main

๐Ÿ”ง Configuration

The config.toml file (at the project root) allows customization of parameters such as:

Key Description
cbz_path Destination folder for CBZ files (default: Documents/manga_downloads).
website Active source (weeb_central -> stable, inmanga-> unstable, leermangaesp) -> stable
multiple_tasks Maximum number of concurrent downloads.
color Export in color (true) or grayscale (false).
cropping_mode Enable automatic margin cropping.
width / height Target resolution; leave empty to keep original size.

You can also modify configuration directly from the terminal. Here are some common use cases:

Change scraper source and concurrency:

  kizamumanga config scraper --website "inmanga" --multiple_tasks 5
  • This switches the active scraper to inmanga and sets the maximum number of parallel download tasks to 5.

Change output folder for CBZ files:

  kizamumanga config paths --cbz_path "./my_manga"
  • This updates the destination directory where downloaded CBZ files are stored.

Apply a predefined resolution profile:

Currently supported device presets: boox_go_7 (more coming soon).

  kizamumanga config dimensions --device "boox_go_7"
  • This automatically assigns width/height settings based on the Boox Go 7 device preset.

Manually set output resolution:

  kizamumanga config dimensions --width 1080 --height 1440
  • This forces a custom resolution (1080ร—1440 px), overriding any preset device profile.

Export in grayscale with margin cropping enabled:

  kizamumanga config output --color false --cropping_mode true
  • This configures exported images to be grayscale and have automatic margin cropping applied.

๐Ÿ•น๏ธ Basic Usage

  • Search for manga: kizamumanga search "One Piece"
  • Download all chapters: kizamumanga install "One Piece"
  • Download a specific chapter or range:
    • kizamumanga install "One Piece" 5
    • kizamumanga install "One Piece" 10-15

By default CBZ files are saved in:

  • Linux/Mac: $HOME/Documents/manga_downloads
  • Windows: %USERPROFILE%\Documents\manga_downloads

You can change the location by using kizamumanga config paths --cbz_path "./my_manga".

๐Ÿ”„ Internal Workflow

  1. The Runner validates arguments, loads configuration, and sets up the selected scraper.
  2. Manga and chapter lists are fetched using Playwright + BeautifulSoup.
  3. Each chapter is downloaded via aiohttp, optionally processed, and packed into a CBZ.

๐Ÿ—‚๏ธ Project Structure

โ”œโ”€โ”€ config.toml
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ src/
    โ””โ”€โ”€ kizamumanga/
        โ”œโ”€โ”€ main.py
        โ”œโ”€โ”€ handlers/
        โ”‚   โ””โ”€โ”€ args_handler.py
        โ”œโ”€โ”€ engine/
        โ”‚   โ”œโ”€โ”€ runner.py
        โ”‚   โ”œโ”€โ”€ downloader.py
        โ”‚   โ”œโ”€โ”€ image_converter.py
        โ”‚   โ””โ”€โ”€ paths.py
        โ”œโ”€โ”€ scraping/
        โ”‚   โ”œโ”€โ”€ base.py
        โ”‚   โ”œโ”€โ”€ weeb_central.py
        โ”‚   โ”œโ”€โ”€ inmanga.py
        โ”‚   โ””โ”€โ”€ leermangaesp.py
        โ””โ”€โ”€ utils/
            โ”œโ”€โ”€ logger.py
            โ”œโ”€โ”€ loading_spinner.py
            โ””โ”€โ”€ general_tools.py

๐Ÿ“œ License

This project is under the license MIT.

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

kizamu_manga-1.1.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

kizamu_manga-1.1.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file kizamu_manga-1.1.0.tar.gz.

File metadata

  • Download URL: kizamu_manga-1.1.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for kizamu_manga-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6d04251066c0a9d29ba8b578c77aa60b54d3195494544b1f33556338955cddc3
MD5 270bae9b3a138cfb18cf4744050eba0f
BLAKE2b-256 0605be3e73368897ce5b8115d3d899b7a4433ddf55f3fc7358f63dcfbde4301a

See more details on using hashes here.

File details

Details for the file kizamu_manga-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: kizamu_manga-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for kizamu_manga-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c88a4753b7fdaddf7aefa8c929e2a0a5c256b4f6b5d8d8793ab5476cfa44d00a
MD5 c15a511f20e10b06901feaef13d9d1d1
BLAKE2b-256 3d015865c94ed701c43e0ad7fa9aba5075e1cec9557cedcbaf0562f4b53cdd82

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