Skip to main content

Command line application and library to download and convert comics from various sources

Project description

mandown

Code style: black Checked with mypy Download from PyPI Download from the AUR Latest release License

Comic downloader and converter to CBZ, EPUB, and/or PDF as a Python library and command line application.

Supported sites

To request a new site, please file a new issue.

Installation

Install the package from PyPI:

pip3 install mandown

Arch Linux users may also install the package from the AUR:

git clone https://aur.archlinux.org/mandown-git.git
makepkg -si

Or, to build from source:

Mandown depends on poetry for building.

git clone https://github.com/potatoeggy/mandown.git
poetry install
poetry build
pip3 install dist/mandown*.whl

Usage

mandown download <URL>

To convert the download contents to CBZ/EPUB, append the --convert option. To apply image processing to the downloaded images, append the --process option.

mandown download <URL> --convert epub --process rotate_double_pages

To convert an existing folder without downloading anything except metadata (like a stripped-down version of https://github.com/ciromattia/kcc), use the convert command.

mandown convert <FORMAT> <PATH_TO_FOLDER>

Run mandown --help for more info.

Library usage

import mandown

# load previously downloaded comic
comic = mandown.read("path/to/comic/folder")
print(comic.metadata, comic.chapters)

# fetch comic from a source by URL
comic = mandown.query(url_to_comic)
print(comic.metadata, comic.chapters)

# download comic to ./comic using 4 threads
mandown.download(comic, "./comic/", threads=4)

# apply image post-processing to comic images in ./comic
mandown.process(comic, "./comic/", options=["rotate_double_pages", "trim_borders"])

# convert comic located in ./comic to epub, storing it in ./epubs
mandown.convert(comic, "./comic/", "epub", "./epubs")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mandown-0.9.0.tar.gz (21.3 kB view hashes)

Uploaded Source

Built Distribution

mandown-0.9.0-py3-none-any.whl (28.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page