Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Kaiman

A CLI manga downloader/scraper written in Rust, supporting multiple manga sites.

Features

  • Download an entire manga series from a single URL
  • Supported sources:
  • Downloads cover art alongside chapters
  • Resumable: tracks the last completed chapter per series (.completed.txt) and skips pages/chapters that are already on disk, so a re-run picks up where it left off
  • Remembers your last-used download path across runs (path_save.txt) so you don't need to pass it every time
  • Adds a randomized delay (2–5s) between chapter requests to avoid hammering source sites
  • Async, concurrent-friendly downloads built on tokio and reqwest

Requirements

  • Rust (stable) and Cargo

Building

git clone https://github.com/Quinceyyyy/Kaiman-Pub.git
cd Kaiman-Pub
cargo build --release

The binary will be at target/release/kaiman.

Usage

kaiman [manga_directory] <manga_url>
  • With an explicit path:

    kaiman '/home/USER/Documents/Manga' 'https://weebcentral.com/series/01J76XY7WMZ8SSQQ38YSXJY055/Dorohedoro'
    
  • Using the last-used (saved) path:

    kaiman 'https://weebcentral.com/series/01J76XY7WMZ8SSQQ38YSXJY055/Dorohedoro'
    

    The first time you run Kaiman with an explicit directory, that path is saved to path_save.txt and reused automatically on subsequent runs where you only pass a URL.

  • Help:

    kaiman HELP
    

Kaiman detects which site the URL belongs to automatically based on the domain, then scrapes and downloads the series into <manga_directory>/<manga_title>/chapter_<n>/page_<nnn>.

How it works

  1. Input handling (handle_input.rs) — parses the given URL, identifies the source site and series ID, and does a quick probe request to confirm the series exists.
  2. Library setup (handle_library.rs) — creates a folder for the series under your manga directory if it doesn't already exist.
  3. Scraping (handle_scraping.rs + per-site modules under components/) — dispatches to a site-specific scraper (weebcentral, mangadex, or mangapill) that lists chapters and, for each one, collects page image URLs (via HTML parsing with scraper for weebcentral/mangapill, or the MangaDex API for mangadex).
  4. Downloading (image_helpers.rs) — downloads the cover and each page image, skipping files that already exist.
  5. Progress tracking (chapter_dir_helpers.rs) — marks each chapter as completed once fully downloaded, so future runs can resume without re-downloading.

Project structure

src/
  main.rs                       Entry point, CLI arg parsing
  errors.rs                     Centralized error type (ErrorVals)
  components/
    handle_input.rs              URL parsing, site detection, series probing
    handle_library.rs            Local series directory setup
    handle_scraping.rs           Dispatches to the correct site scraper
    write_user_path.rs           Persists/reads the last-used download path
    mangadex/                    MangaDex API-based scraper
    mangapill/                   Mangapill HTML scraper
    weebcentral/                 Weebcentral HTML scraper
  utils/
    api_helper.rs                Per-site API/URL construction helpers
    chapter_dir_helpers.rs       Chapter directories + completion tracking
    image_helpers.rs             Cover/page image downloading
    misc.rs                      Randomized delay between requests
    help.rs                      CLI help text

Output layout

<manga_directory>/
  <manga_title>/
    <manga_title>_cover
    .completed.txt        # last completed chapter index
    chapter_1/
      page_001
      page_002
      ...
      .completed          # marker for a fully downloaded chapter
    chapter_2/
      ...

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages