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) -> unstable
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.2.0.tar.gz (21.5 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.2.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kizamu_manga-1.2.0.tar.gz
  • Upload date:
  • Size: 21.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 482d611cc46c9664341fbd59f173fe2f9e033a1894e144bcad498cb6fe1f7a56
MD5 3a91a58328320287ca0193cfa45acde0
BLAKE2b-256 d6efcce2c88615a7a7c7617a23d6338b33762984d565cb79ca83afb0575406f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kizamu_manga-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f991c9131431c23ef20485fb7f7dc064c7d30aee8e7893f48e9f77a2f51bfef8
MD5 a410043a69d892c9f6de0fada5f54dbf
BLAKE2b-256 73176354ec359e17694151c0bd85a3d52d9a638a3c9c5e47f754f195fd2ea22a

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