Giter VIP home page Giter VIP logo

komga-cover-extractor's Introduction

Komga Cover Extractor

A python automation script that detects and extracts the cover from your cbz and epub files for each individal volume. Then takes the cover from the first volume and copies that as a cover file for your overall collection.

Allowing the user to use local high-resolution covers within Komga instead of the compressed versions that Komga generates.

Primary usage is with https://github.com/gotson/komga, with volume releases.

There is no compression of the cover by default, see usage at the bottom for compressing the covers.

Cover Detection

Detection is based on various scene releases, if none are detected, it will default to the first image. Which, unless you have scans from online, will almost always be the cover.

Finished Result EX:

image

Instructions

  1. Run git clone https://github.com/zachstultz/komga-cover-extractor.git or download the repository up above.
  2. Run pip3 install -r requirements.txt
  3. (OPTIONAL) (IGNORE IF ALL YOU INTEND TO USE IS COVER EXTRACTION) (ONLY REQUIRED FOR OPT RAR FEATURES)
  4. Read usage below and enjoy!

Usage

usage: komga_cover_extractor.py [-h] [-p [PATHS [PATHS ...]]] [-wh [WEBHOOK [WEBHOOK ...]]] [-c COMPRESS] [-cq COMPRESS_QUALITY]

Scans for covers in the cbz and epub files.

optional arguments:
  -h, --help            show this help message and exit
  -p [PATHS [PATHS ...]], --paths [PATHS [PATHS ...]]
                        The path/paths to be scanned for cover extraction.
  -wh [WEBHOOK [WEBHOOK ...]], --webhook [WEBHOOK [WEBHOOK ...]]
                        The optional discord webhook url for notifications about changes and errors.
  -c COMPRESS, --compress COMPRESS
                        Whether or not to compress the extracted cover images.
  -cq COMPRESS_QUALITY, --compress_quality COMPRESS_QUALITY
                        The quality of the compressed cover images.

Examples

with compression example:

python3 komga_cover_extractor.py -p "/path/to/manga" -p "/path/to/novels" -c "True" -cq "60"

without compression example:

python3 komga_cover_extractor.py -p "/path/to/manga" -p "/path/to/novels"

Goals

  1. Transform script into manga/light novel manager with many features that includes cover extraction, but is not exclusive to it. (in-progress)
  2. Modularize volume keyword regexes across the script. (in-progress)
  3. Better documentation.

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.