Converts .cbr and .cbz files to .pdf
Project description
comic2pdf
A script to convert comic files (cbr, cbz) to pdf, in python3.
Getting Started
Installing
Install the package using setuptools.
$ python setup.py install
Running
The comic2pdf
command should be globally available, pass as arguments the path(s) to the cbr / cbz files and optionally specify an output folder. The output files will be named the same as the input files but with a .pdf extension.
usage: comic2pdf [-h] [-o OUTDIR] [--version] path [path ...]
Converts .cbr and .cbz files to .pdf
positional arguments:
path paths to process
optional arguments:
-h, --help show this help message and exit
-o OUTDIR, --outdir OUTDIR
directory to place generated files
-a, --allow-overwrite
allow overwriting existing files
--version show program's version number and exit
e.g. to process all files in a folder (will ignore any file extensions except .cbr, .cbz, .rar or .zip).
$ comic2pdf *
Prerequisites
Requires Python 3.6+.
Production dependencies are listed in setup.py
. Development dependencies are listed in requirements.txt
.
No install
You can use the package without installing it, simply install dependencies and run the comic2pdf.py
script. E.g.
$ pip install -r requirements.txt
$ python comic2pdf.py -o /dest/folder file.cbr
Development
Installing
Development is aided by a Makefile which uses a virtual environment. To setup the virtual environment and install dependencies:
$ make init
Running
To test changes to your script, you can install a development version which links to your source code:
$ python setup.py develop
And this can be uninstalled with
$ python setup.py develop --uninstall
You may also run the script directly, but note that the dependencies are installed into the virtual environment. To enter the virtual environment:
# Windows
$ source .venv/Scripts/activate
# Mac
$ source .venv/bin/activate
Then run the script directly.
(.venv) $ python comic2pdf.py -h
Linting & formatting
This project makes use of the Black python code formatter which automatically reformats code. To run Black and lint the code, use:
$ make lint
Publishing
- Update
setup.py
with the new version number (e.g. 1.1.1) - Create a new GitHub release (e.g.
git tag -a v1.1.1 -m "Version v1.1.1" && git push --tags
) - Push to PyPI
$ make deploy
Authors and Acknowledgments
- phdesign
- MComas1 (https://github.com/MComas1/comics2pdf)
- bransorem (https://github.com/bransorem/comic2pdf)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file comic2pdf-3.1.0.tar.gz
.
File metadata
- Download URL: comic2pdf-3.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4193c7481207a46992e84658584423156fb497d7fa6f25422967d890ae93a09 |
|
MD5 | 82171d5c5a83494d20024c363b37cf1a |
|
BLAKE2b-256 | cbf42fa4e002af269189abe386ff523bb9dcad8623e0f498bda3cc1cd5ce5dd8 |