Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rourien/kcc

 
 

Repository files navigation

KCC

GitHub release GitHub release PyPI AUR

Kindle Comic Converter is a Python app to convert comic/manga files or folders to EPUB, Panel View MOBI or E-Ink optimized CBZ. It was initially developed for Kindle but since version 4.6 it outputs valid EPUB 3.0 so despite its name, KCC is actually a comic/manga to EPUB converter that every e-reader and color tablet owner can happily use. It can also optionally optimize images by applying a number of transformations.

A word of warning

KCC is not Amazon's Kindle Comic Creator nor is in any way endorsed by Amazon. Amazon's tool is for comic publishers and involves a lot of manual effort, while KCC is for comic/manga readers. KC2 in no way is a replacement for KCC so you can be quite confident we are going to carry on developing our little monster ;-)

Issues / new features / donations

If you have general questions about usage, feedback etc. please post it here. If you have some technical problems using KCC please file an issue here. If you can fix an open issue, fork & make a pull request.

If you find KCC valuable you can consider donating to the authors:

  • Ciro Mattia Gonano:
    • Donate PayPal
    • Donate Flattr
  • Paweł Jastrzębski:
    • Donate PayPal
    • Donate Bitcoin

BINARY RELEASES

You can find the latest beta binaries here

You can find the latest released binary at the following links:

  • Windows (64-bit only)
  • macOS (10.14+)
  • Linux: Currently unavailable.

PYPI

KCC is also available on PyPI. (Non-beta release)

pip install --user KindleComicConverter

DEPENDENCIES

Following software is required to run Linux version of KCC and/or bare sources:

On Debian based distributions these two commands should install all needed dependencies:

sudo apt-get install python3 python3-dev python3-pip libpng-dev libjpeg-dev p7zip-full
pip3 install --user --upgrade pillow python-slugify psutil pyqt5 raven mozjpeg-lossless-optimization pandas

Optional dependencies

  • KindleGen v2.9+ in a directory reachable by your PATH or in KCC directory (For MOBI generation)
  • 7z (For CBZ/ZIP, CBR/RAR, 7z/CB7 support)

INPUT FORMATS

KCC can understand and convert, at the moment, the following input types:

  • Folders containing: PNG, JPG, GIF or WebP files
  • CBZ, ZIP (With 7z executable)
  • CBR, RAR (With 7z executable)
  • CB7, 7Z (With 7z executable)
  • PDF (Only extracting JPG images)

USAGE

Should be pretty self-explanatory. All options have detailed information in tooltips. After completed conversion, you should find the ready file(s) alongside the original input file(s) (same directory) or in the specified the output directory.

Please check our wiki for more details.

See an updated profile list here along with instructions for adding a custom profile.

CLI version of KCC is intended for power users. It allows using options that might not be compatible and decrease the quality of output.

Standalone kcc-c2e.py usage:

Usage: kcc-c2e [options] [input]

MANDATORY:
  input                 Full path to comic folder(s) or file(s) to be proccessed. Separate multiple
                        inputs with spaces.

MAIN:
  -p PROFILE, --profile PROFILE
                        Device profile (Common options: K578, KPW5, KV, KoGHD, KoA, KoAHD, KoAH2O,
                         KoAO, KoC, KoL, KoF, KoN, KoE, KoS). For a list of all avaliable profiles,
                         type -h profile [Default=KV]
  -m, --manga-style     Manga style (right-to-left reading and splitting)
  -q, --hq              Try to increase the quality of magnification
  -2, --two-panel       Display two not four panels in Panel View mode
  -w, --webtoon         Webtoon processing mode

PROCESSING:
  -n, --noprocessing    Do not modify image and ignore any profile or processing option
  -u, --upscale         Resize images smaller than device's resolution
  -s, --stretch         Stretch images to device's resolution
  -r {0,1,2}, --splitter {0,1,2}
                        Double page parsing mode. 0: Split 1: Rotate 2: Both [Default=0]
  -g GAMMA, --gamma GAMMA
                        Apply gamma correction to linearize the image [Default=Auto]
  -c {0,1,2}, --cropping {0,1,2}
                        Set cropping mode. 0: Disabled 1: Margins 2: Margins + page numbers
                        [Default=2]
  --cp CROPPINGPOWER, --croppingpower CROPPINGPOWER
                        Set cropping power [Default=1.0]
  --cm CROPPINGMINIMUM, --croppingminimum CROPPINGMINIMUM
                        Set cropping minimum area ratio [Default=0.0]
  -bc BORDERCOLOR, --bordercolor BORDERCOLOR
                        Color of borders. Either use one of the available named colors or
                        the hexadecimal value of the color. For a list of all avaliable
                        named colors, type -h bordercolor. Auto tries to detect whether to
                        use black or white. [Default=Auto]
  --fc, --forcecolor    Don't convert images to grayscale
  --fp, --forcepng      Create PNG files instead JPEG
  --mj, --mozjpeg       Create JPEG files using mozJpeg

OUTPUT SETTINGS:
  -o OUTPUT, --output OUTPUT
                        Output generated file to specified directory or file
  --cst COPYSOURCETREE, --copysourcetree COPYSOURCETREE
                        Additional option for use with --output. Name of the top most directory to
                        be used when recreating the source directory tree in the output directory.
  -t TITLE, --title TITLE
                        Comic title [Default=filename or directory name]
  -f {Auto,MOBI,EPUB,CBZ,KFX}, --format {Auto,MOBI,EPUB,CBZ,KFX}
                        Output format (Available options: Auto, MOBI, EPUB, CBZ, KFX) [Default=Auto]
  -b {0,1,2}, --batchsplit {0,1,2}
                        Split output into multiple files. 0: Don't split 1: Automatic mode 2:
                        Consider every subdirectory as separate volume [Default=0]
  -e {0,1,2,3,4,5}, --skipexisting {0,1,2,3,4,5}
                        Skip processing specific files. 0: Do not skip. 1: Skip if the wanted file
                        already exists in the output directory. 2: Skip if the source file was
                        already processed. 3: Copy the already processed file to the output
                        directory. 4: Use both options 1 and 2. 5: Use both options 1 and 3.
                        [Default=0]
  -z PADZEROS, --padzeros PADZEROS
                        Pad "_kcc(#)" with given number of zeros. [Default=0]
  --cci, --copycomicinfo
                        Copy ComicInfo.xml to generated file

CUSTOM PROFILE:
  --cw CUSTOMWIDTH, --customwidth CUSTOMWIDTH
                        Replace screen width provided by device profile
  --ch CUSTOMHEIGHT, --customheight CUSTOMHEIGHT
                        Replace screen height provided by device profile

OTHER:
  -h, --help            Show this help message and exit

Standalone kcc-c2p.py usage:

Usage: kcc-c2p [options] [input]

MANDATORY:
  input                 Full path to comic folder(s) to be proccessed. Separate multiple
                        inputs with spaces.
  -y HEIGHT, --height HEIGHT
                        Height of the target device screen
  -i, --in-place        Overwrite source directory
  -m, --merge           Combine every directory into a single image before splitting
  -o OUTPUT, --output OUTPUT
                        Output generated directories to specified directory

OTHER:
  -d, --debug           Create debug file for every split image
  -h, --help            Show this help message and exit

CREDITS

KCC is made by Ciro Mattia Gonano and Paweł Jastrzębski.

This script born as a cross-platform alternative to KindleComicParser by Dc5e (published here).

The app relies and includes the following scripts:

SAMPLE FILES CREATED BY KCC

PRIVACY

KCC is initiating internet connections in two cases:

  • During startup - Version check.
  • When error occurs - Automatic reporting on Windows and macOS.

KNOWN ISSUES

Please check wiki page.

COPYRIGHT

Copyright (c) 2012-2019 Ciro Mattia Gonano and Paweł Jastrzębski. KCC is released under ISC LICENSE; see LICENSE.txt for further details.

About

KCC (a.k.a. Kindle Comic Converter) is a comic and manga converter for ebook readers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.8%
  • Rich Text Format 4.7%
  • Other 0.5%