A cli script to download and package manga into CBZ for Komga
Project description
mangadlmao
A cli script to download and package manga into CBZ for Komga.
What sets it apart from other scripts like this is that it creates
a ComicInfo.xml
for Komga and it will also download any updated chapters
to get the latest versions with fixes.
File modified times are used to track which chapters have already been downloaded.
Note: The API for Semantic Versioning purposes is considered the configuration file and cli options. Every python module contained in this package is internal and subject to breaking changes at any time.
Installation
Install using pip:
python -m pip install mangadlmao
Optionally you can install the xor-cipher package to speed up decryption:
python -m pip install xor-cipher
Usage
This script is primarily meant to be used with a configuration file.
However, there are some command line arguments that can be used:
$ mangadlmao --help
Usage: mangadlmao [OPTIONS] [URL]...
Download Manga from the configuration file or URL arguments.
Options:
-v, --verbose More verbose messages
-c, --config PATH Print or set configuration file path.
-j, --jobs INTEGER Number of parallel chapter page downloads. [default: 4]
-l, --lang TEXT Language to download when URLs are given, can be
provided multiple times.
-e, --exclude TEXT Scanlation groups and users to exclude, can be provided
multiple times.
-s, --since TEXT Download only chapters updated after specified date
(eg.: 2022-02-22). If set to 'auto', only chapters newer
than the most recent will be downloaded. If set to
'null' (default), all chapters will be downloaded.
-f, --from FLOAT Download only chapters starting from provided number
--help Show this message and exit.
The default download directory is the current directory. You can change it through the configuration file.
Configuration
You can get the location of the configuration file by running mangadlmao -c
or specify a custom path with mangadlmao --config=/custom/location/config.yml
The configuration file format is YAML:
---
download_directory: "."
# default "since", can be null, a date, or auto (default: auto)
# - null: download everything
# - auto: download only chapters newer than the most recently created local chapter
# - a date: eg.: 2022-02-22, only chapters updated after the date will be downloaded
since: auto
# default languages to download, can be overridden per manga
lang:
- en
# global exclude for groups and users, can be name or id
exclude:
- TerribleMachineTranslator
- 33171bc6-0c2a-40d7-9cca-120ac52f09ae
manga:
# entries with url can be either MangaDex, MangaSee, or MangaPlus
- url: https://mangadex.org/title/15931821-1a3a-4aee-b27c-1c95d8d5dcf1/hololive-yohane-s-twitter-shorts
title: Hololive Shorts by Yohane
# override default "since" setting:
since: 2020-12-24
# only download chapters starting from chapter number 69
from: 69
# override default languages (only works for MangaDex):
lang: [en, de]
# additional group and user excludes (only works for MangaDex):
exclude:
- AnotherTerribleMachineTranslator
# entries with id are treated as MangaDex entries
- title: Nice Manga Title
id: aed22b2e-b544-4204-9702-cdf5cfc167de
# entries with rss are currently treated as MangaSee entries
- title: Manga 69
rss: https://mangasee/rss/Manga-69.xml
since: 2020-12-24
# lang has no effect with MangaSee
The title
key is optional but because it is used as directory name, if the name changes
server-side, all chapters will be re-downloaded into a new directory.
Development
Install the package as editable and install development dependencies from requirements.txt
:
python -m pip install -e .
python -m pip install -r requirements.txt
Then install pre-commit:
pre-commit install
Configure git to use the .git-blame-ignore-revs
file:
git config blame.ignoreRevsFile .git-blame-ignore-revs
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
Built Distribution
File details
Details for the file mangadlmao-1.4.0.tar.gz
.
File metadata
- Download URL: mangadlmao-1.4.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3893ba807cfe9d91d5659d02d55551197e1f56d8cdb6357b9afb450bdeed2bdc |
|
MD5 | 78275960b93fc420950348ad55d153e6 |
|
BLAKE2b-256 | a988d80d8cfb04fbf7b67b6d90b7881335670c40078f21ad39c9ff39ba52d7dd |
File details
Details for the file mangadlmao-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: mangadlmao-1.4.0-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b4a2b970696dcdf884371b284a5dd5fa4dbe32e50b1fbf74e28dcf378e4630c |
|
MD5 | e379d2d07e0adeed720be9189018b489 |
|
BLAKE2b-256 | bbabd961cc3aa4a4458fb83f79a85ffe58332eb0a2f33ee352a6731e32018ce3 |