2015-11-01 14:03:54 +01:00
2015-10-30 02:33:45 +01:00
2015-11-01 13:57:30 +01:00
2015-10-30 02:33:45 +01:00
2015-10-30 02:33:45 +01:00
2015-11-01 14:03:54 +01:00

CBconvert

Introduction

CBconvert is a Comic Book convert tool.

Features

  • reads rar, zip, 7z, gz, bz2, cbr, cbz, cb7, cbt, pdf and plain directory
  • always saves processed comic in cbz (zip) format
  • images can be converted to JPEG, PNG or 4-Bit BMP (16 colors) format
  • choose resize algorithm (NearestNeighbor, Bilinear, Bicubic, MitchellNetravali, Lanczos2/3)
  • export covers from comics
  • create thumbnails from covers by freedesktop specification

Download

Compile

Install poppler, poppler-glib, cairo and imagemagick dev packages:

apt-get install libpoppler-glib-dev libcairo2-dev libmagickcore-dev libmagickwand-dev

Install go package:

go get github.com/gen2brain/cbconvert
go install github.com/gen2brain/cbconvert && cbconvert

Dependencies

go get github.com/cheggaaa/go-poppler
go get github.com/cheggaaa/pb
go get github.com/gen2brain/go-unarr
go get github.com/gographics/imagick/imagick
go get github.com/hotei/bmp
go get github.com/nfnt/resize
go get github.com/skarademir/naturalsort
go get github.com/ungerik/go-cairo
go get gopkg.in/alecthomas/kingpin.v2

Using

usage: cbconvert [<flags>] <args>...

Comic Book convert tool.

Flags:
      --help             Show context-sensitive help (also try --help-long and --help-man).
      --version          Show application version.
  -p, --png              encode images to PNG instead of JPEG
  -b, --bmp              encode images to 4-Bit BMP instead of JPEG
  -w, --width=0          image width
  -h, --height=0         image height
  -q, --quality=75       JPEG image quality
  -n, --norgb            do not convert images with RGB colorspace
  -i, --interpolation=1  0=NearestNeighbor, 1=Bilinear, 2=Bicubic, 3=MitchellNetravali, 4=Lanczos2, 5=Lanczos3
  -s, --suffix=SUFFIX    add suffix to file basename
  -c, --cover            extract cover
  -t, --thumbnail        extract cover thumbnail (freedesktop spec.)
  -o, --outdir="."       output directory
  -m, --size=0           process only files larger then size (in MB)
  -r, --recursive        process subdirectories recursively
  -Q, --quiet            hide console output

Args:
  <args>  filename or directory

Examples

Rescale images to 1200px for all supported files found in directory with size larger then 60MB:

cbconvert --recursive --width 1200 --size 60 /media/comics/Thorgal/

Convert all images in archive to 4bit BMP image and save result in ~/comics directory:

cbconvert --bmp --outdir ~/comics /media/comics/Garfield/Garfield_01.cbz

BMP format is uncompressed, for black&white pages very good choice. Archive size can be smaller 2-3x and file will be readable by comic readers.

Generate thumbnails by freedesktop specification in ~/.thumbnails/normal directory, Lanczos3 algorithm is used for resizing:

cbconvert --interpolation=5 --outdir ~/.thumbnails/normal --thumbnail /media/comics/GrooTheWanderer/
Description
No description provided
Readme 5.3 MiB
Languages
Go 100%