Python script to generate basic .cbds files for ComicBookDS from CBZ/ZIP/CBR/RAR/images.
PictoDS is very old and can be difficult to run on modern systems, so this script tries to provide a simple command-line alternative for Linux/macOS.
This is not meant to be a perfect replacement for PictoDS, but it should be enough to generate basic .cbds files.
-
Python 3.10+
-
Pillow
-
rarfile
-
For .cbr/.rar input: an installed RAR extractor supported by rarfile, such as unrar, unar, or bsdtar
Install Pillow and rarfile with:
python3 -m pip install -r requirements.txtOr using your distro package manager if using Linux:
sudo apt install python3-pil
sudo dnf install python3-pillowAlso unrar tools (depending on your distro/macOS):
sudo apt install unrar
sudo dnf install unrar
brew install unrarOpen PowerShell in the project folder and run
py -m pip install -r requirements.txtFor Windows, install WinRAR, 7-Zip, or another tool that provides RAR extraction support and make sure it is available in PATH.
- On Linux/macOS, use
python3line - On Windows, use the
pyline
Convert a CBZ:
python3 make_cbds.py comic.cbz
py make_cbds.py comic.cbzConvert a ZIP:
python3 make_cbds.py comic.zip
py make_cbds.py comic.zipConvert a CBR:
python3 make_cbds.py comic.cbr
py make_cbds.py comic.cbrConvert a folder of images:
python3 make_cbds.py ./comic_pages -o comic.cbds
py make_cbds.py .\comic_pages -o comic.cbdsManga / right-to-left mode:
python3 make_cbds.py manga.cbz --rtl -o manga.cbds
py make_cbds.py manga.cbz --rtl -o manga.cbdsLower JPEG quality to reduce file size:
python3 make_cbds.py comic.cbz -q 80 -o comic.cbds
py make_cbds.py comic.cbz -q 80 -o comic.cbdsSupported input:
- .cbz
- .zip
- .cbr
- .rar
- Folder of images
Supported image extensions:
- .jpg
- .jpeg
- .png
- .webp
- .bmp
- .gif
The generated .cbds contains the folders expected by ComicBookDS:
IMAGESMALL_NTHMB_NSMALL_RTHMB_RNAMEComicBookDS_book.ini
Install development dependencies:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txtRun tests:
python -m pytest -qMIT