ToofDerling / CbzMage

Convert azw and pdf comic books to nice cbz files
MIT License
33 stars 1 forks source link
azw azw3 backup cbz cbz-archive comic-books comics command-line-tool conversion convert converter ebooks manga nice-cbz-files no-drm pdf pdf-converter

CbzMage.

Azw file conversion doesn't work with the latest Kdl. You have to use a version earlier than 2.2.0 (read more here).

CzbMage is a comic book converter. It aims to do exactly two things:

  1. Convert azw files to nice cbz files, ready to read in your favorite cbz reader. Azw files entirely like the ones found in Kdl for PC or Mac. Additionally, if CbzMage finds a matching azw.res file it will merge in any HD images found for the highest possible quality. Comic title and publisher will be read from the azw file, and running CbzMage in scan mode will allow you to edit the values before the conversion. You can also point CbzMage at a file or directory and it will process any azw or azw3 files it finds directly.
  2. Convert pdf files to nice cbz files. Point CbzMage at a single pdf comic book or a directory of pdf comic books and it will convert them to cbz files in the highest possible quality.

All of this works fully in CbzMage Version 1.0.

CbzMage is a commandline tool written in c#. It requires no installation, very little configuration and no drm plugin/tool (the last part may change in the future). It does require that .NET 6 is installed on your computer. The pdf conversion requires that Ghostscript version 10+ is installed on your computer.

CbzMage is released for Windows, Linux, and macOS (but support for the macOS version will be limited as I don't own a Mac). Since the Kdl app only works on PC and Mac the azw conversion is probably not relevant for Linux users, but the pdf conversion works as advertised (but see the note about Ghostscript 10 on Linux below).

Download CbzMage to your hard drive and unpack it anywhere. Have a look at the settings in AzwConvertSettings.json or PdfConvertSettings.json, they are all thoroughly documented there (I hope). Open a command shell and run CbzMage right away, or check out some more information:

Azw conversion.

Open the AzwConvertSettings.json file in a text editor and configure AzwDir. Please note the comment about moving the azw directory as running CbzMage for the first time may double the size of your azw directory.

Important: Close Kdl before running CbzMage. Kdl locks some of the azw files when it's running, so there's a high chance that CbzMage will crash because it can't read a locked azw file.

Running CbzMage with the "AzwConvert" parameter.

Running CbzMage with the "AzwScan" parameter.

Azw conversion notes.

Using CbzMage to convert or scan files directly.

Pdf conversion.

It's been mentioned before, but let me say it again: pdf conversion requires that that Ghostscript version 10+ is installed on your computer. Once you have that part working there's no need to configure anything, simply try

Running CbzMage with the "PdfConvert" parameter.

Pdf conversion notes.

Notes.

Credits.

The azw parser is mostly copied from the Mobi Metadata Reader by Limey. I cleaned it up, fixed the FullName parsing, and added support for retrieving SD and HD images, the rest is Limey's work. This Stack Overflow post was very helpful when figuring out how to extract cover images. Azw6 header structure was gleaned from UnpackKindleS

That's it.

If you have any questions or want to request a feature use Discussions. If you want to report a bug use Issues. Happy converting.