A tool to convert CBZ comics to DJVU books for better reading experience on e-readers
- Three modes of conversion:
- color ~75% the size of CBZ (on average)
- grayscale ~60%
- b&w ~10%
- Can scale images down to not be larger than screen size of a target device to achieve minimal file size
- Can auto-detect volumes and chapters structure and write them as a table of contents (disabled by default, see advanced usage)
- Allows adjustment of DPI for converted document
- May serve as a replacement for my old Manga2Djvu project
- Linux only (untested but may work on bsd/macOS)
- Ungodly slow
- Does not clean up after itself
- Download
cbz2djvu.py
and place it into any empty folder - Install
unzip
,djvulibre-bin
,imagemagick
andpython3
dependencies if you don't have them
- Place your .cbz book into the folder you placed cbz2djvu script
- Make sure you have at least twice as much free space on your drive as your .cbz file takes, because this program creates a lot of temporary files
- Start the script by typing
./cbz2djvu.py FILENAME
into the terminal (b&w mode is assumed by default, see advanced usage) - Wait for a very long time (can take up to 45 minutes), until the program prints "Done!" and exits
- FILENAME.djvu will be your converted comic, you can delete everything else if not needed
Flag | What for |
---|---|
-h |
Displays help message |
--dpi=DPI |
Set DPI value for a final document |
--gs |
Set document conversion mode to grayscale for smaller file size |
-clr |
Keep color data of images, produces largest size file |
--detectTOC |
Guess table of contents from the folder structure (very unstable, likely to crash, better to use "justTOC" flag) |
--justTOC |
Guess table of contents and append it to the already made file without re-generating it |
--nocleanup |
Do not delete files from previous runs (likely to mess things up, use at your own risk) |
--fitscreen |
Scale images down to not be larger than screen size of a target device. Needs geometry input in WIDTHxHEIGHT format |
- Improve table of contents detection
- Somehow increase program's speed (maybe multi-threading would help?)
- Iron out UI and small bugs (just for satisfaction, it's not like anybody is going to use the thing)
- Kill the program (unfortunately it is not responsive to ^C, so you'd need to use htop or any other tool)
- Read what the errors say
- Can't help you much more unfortunately, but there are links for documentation of tools used in the script: