Giter Club home page Giter Club logo

comic-tools's Introduction

comic-tools

A buncha tools for properly naming comic and manga images in archives.

Intro

A lot of manga archives are named in a way that makes it difficult do automated tasks with.
Many other archives are formatted nicely, and these tools are meant to help you get your archives to that point.

What is a "nice" format?

The "nice" format is as follows:
SERIES - cXXX (vYY) - pZZZ.jpg
So, for example, a chapter of Cool Story have its images named:
Cool Story - c001 (v01) - p001.jpg
Cool Story - c001 (v01) - p002.jpg
...

Additional "nice" things to add would be tags like [Cover], [Padding], [ToC], etc. at the end of the filename.
Because these can be done manually and aren't utterly necessary, I haven't taken the time to automate them.

Requirements

  • Python 3+

Usage

Run main.py and follow the prompts.

The Tools

  1. Rename Volume Files
  2. Convert Folder to CBZ
  3. Split Volume into Chapters
  4. Convert Volumes to CBV

Rename Volume Files

This option will run perform three actions in order to rename the images in a volume to the "nice" format. In this process, we'll be using volume 1 of a manga called "Cool Story" as an example.

  1. Reset
    "Reset" the image filenames to a sequential order
    cool_story_001.jpg will become 00001.jpg
  2. Pages
    Set the filenames to the SERIES - cXXX (vYY) - pZZZ format
    00001.jpg will become Cool Story - cXXX (v01) - p001.jpg
  3. Chapters
    Use chapters.csv (see below) to set the chapter numbers of the images Cool Story - cXXX (v01) - p001.jpg will become Cool Story - c001 (v01) - p001.jpg

chapters.csv

This file is used to set the chapter numbers of the images by counting the pages as they're read and checking when the chapter changes.
The format is as follows:

001,000
002,017
003,035
004,053

*note: the first chapter should almost always start at 000

Convert Folder to CBZ

This process will take a directory of images and convert them to a CBZ file. A folder that looks like

Cool Story v01
├── Cool Story - c001 (v01) - p001.jpg
├── Cool Story - c001 (v01) - p002.jpg
├── Cool Story - c001 (v01) - p003.jpg
¦
└── Cool Story - cXXX (v01) - pZZZ.jpg

and make it into a zip file called
Cool Story v01.cbz

Split Volume into Chapters

This process will take a volume .CBZ file (or directory of CBZ files) and them into chapters.
Cool Story v01.cbz
will become
Cool Story - c001 (v01).cbz
Cool Story - c002 (v01).cbz
...

Convert Volumes to CBV

Based on a format proposal of sorts that I made, this process will take a directory of chapters and convert them to CBV files. A folder that looks like

Cool Story
├── Cool Story - Chapter 001 (v01).cbz
├── Cool Story - Chapter 002 (v01).cbz
├── Cool Story - Chapter 003 (v01).cbz
¦
└── Cool Story - Chapter XXX (vYY).cbz

and make it into a zip file called
Cool Story v01.cbv
which internally looks like

Cool Story v01.cbv
├── Cool Story - Chapter 001 (v01).cbz
├── Cool Story - Chapter 002 (v01).cbz
├── Cool Story - Chapter 003 (v01).cbz
¦
└── Cool Story - Chapter XXX (v01).cbz

Notes

  • Spreads are not automatically detected if they're not already joined. If you process a volume that has unmarked spreads, it may mess up the page count, causing the chapter numbers to be off.
  • Some chapters or volumes may need an additional empty page before various points in the chapter (primarily the table of contents), otherwise the page count may be off.
    • Before doing any processing related to chapters, make sure that the page numbers you provide are accurate to the files you're processing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.