2022-08-15 13:47:16 +02:00
|
|
|
# manga-dlp - python script to download mangas
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-08-15 13:55:58 +02:00
|
|
|
> Full docs: https://manga-dlp.ivn.sh
|
|
|
|
|
2022-08-15 13:47:16 +02:00
|
|
|
CI/CD
|
2022-06-20 14:31:41 +02:00
|
|
|
|
2022-06-22 19:52:42 +02:00
|
|
|
[![status-badge](https://img.shields.io/drone/build/olofvndrhr/manga-dlp?label=tests&server=https%3A%2F%2Fci.44net.ch)](https://ci.44net.ch/olofvndrhr/manga-dlp)
|
2022-06-21 16:33:55 +02:00
|
|
|
[![Last Release](https://img.shields.io/github/release-date/olofvndrhr/manga-DLP?label=last%20release)](https://github.com/olofvndrhr/manga-dlp/releases)
|
2022-07-22 21:56:51 +02:00
|
|
|
[![Version](https://img.shields.io/github/v/release/olofvndrhr/manga-dlp?label=git%20release)](https://github.com/olofvndrhr/manga-dlp/releases)
|
|
|
|
[![Version PyPi](https://img.shields.io/pypi/v/manga-dlp?label=pypi%20release)](https://pypi.org/project/manga-dlp/)
|
2022-06-20 14:31:41 +02:00
|
|
|
|
2022-08-15 13:47:16 +02:00
|
|
|
Code Analysis
|
2022-06-20 14:31:41 +02:00
|
|
|
|
2022-05-10 18:42:17 +02:00
|
|
|
[![Quality Gate Status](https://sonarqube.44net.ch/api/project_badges/measure?project=olofvndrhr%3Amanga-dlp&metric=alert_status&token=f9558470580eea5b4899cf33f190eee16011346d)](https://sonarqube.44net.ch/dashboard?id=olofvndrhr%3Amanga-dlp)
|
|
|
|
[![Coverage](https://sonarqube.44net.ch/api/project_badges/measure?project=olofvndrhr%3Amanga-dlp&metric=coverage&token=f9558470580eea5b4899cf33f190eee16011346d)](https://sonarqube.44net.ch/dashboard?id=olofvndrhr%3Amanga-dlp)
|
|
|
|
[![Bugs](https://sonarqube.44net.ch/api/project_badges/measure?project=olofvndrhr%3Amanga-dlp&metric=bugs&token=f9558470580eea5b4899cf33f190eee16011346d)](https://sonarqube.44net.ch/dashboard?id=olofvndrhr%3Amanga-dlp)
|
2022-06-22 19:52:42 +02:00
|
|
|
[![Security](https://img.shields.io/snyk/vulnerabilities/github/olofvndrhr/manga-dlp)](https://app.snyk.io/org/olofvndrhr-t6h/project/aae9609d-a4e4-41f8-b1ac-f2561b2ad4e3)
|
2022-06-20 14:31:41 +02:00
|
|
|
|
2022-08-15 13:47:16 +02:00
|
|
|
Meta
|
2022-06-20 14:31:41 +02:00
|
|
|
|
2022-07-22 21:56:51 +02:00
|
|
|
[![Code style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)
|
|
|
|
[![Linter](https://img.shields.io/badge/linter-pylint-yellowgreen)](https://pylint.pycqa.org/en/latest/)
|
|
|
|
[![Types](https://img.shields.io/badge/types-mypy-blue)](https://github.com/python/mypy)
|
|
|
|
[![Imports](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort)
|
|
|
|
[![Tests](https://img.shields.io/badge/tests-pytest%20%7C%20tox-yellow)](https://github.com/pytest-dev/pytest/)
|
|
|
|
[![Coverage](https://img.shields.io/badge/coverage-coveragepy-green)](https://github.com/nedbat/coveragepy)
|
|
|
|
[![License](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://snyk.io/learn/what-is-mit-license/)
|
2022-06-22 20:01:30 +02:00
|
|
|
[![Compatibility](https://img.shields.io/pypi/pyversions/manga-dlp)](https://pypi.org/project/manga-dlp/)
|
2022-06-20 14:31:41 +02:00
|
|
|
---
|
2021-12-19 17:40:12 +01:00
|
|
|
|
2021-12-22 11:28:54 +01:00
|
|
|
## Description
|
2022-05-10 18:42:17 +02:00
|
|
|
|
2022-05-09 15:50:22 +02:00
|
|
|
A manga download script written in python. It only supports [mangadex.org](https://mangadex.org/) for now. But support
|
|
|
|
for other sites is planned.
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-05-09 15:50:22 +02:00
|
|
|
Before downloading a new chapter, the script always checks if there is already a chapter with the same name in the
|
|
|
|
download directory. If found the chapter is skipped. So you can run the script on a schedule to only download new
|
|
|
|
chapters without any additional setup.
|
|
|
|
|
2022-05-09 21:07:37 +02:00
|
|
|
The default behaiviour is to pack the images to a [cbz archive](https://en.wikipedia.org/wiki/Comic_book_archive). If
|
2022-05-09 15:50:22 +02:00
|
|
|
you just want the folder with all the pictures use the flag `--nocbz`.
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-05-16 16:09:17 +02:00
|
|
|
## _Currently_ Supported sites
|
2021-12-25 00:26:16 +01:00
|
|
|
|
2022-05-16 16:09:17 +02:00
|
|
|
- [Mangadex.org](https://mangadex.org/)
|
2021-12-25 00:26:16 +01:00
|
|
|
|
2021-12-22 11:28:54 +01:00
|
|
|
## Usage
|
|
|
|
|
2022-05-09 21:07:37 +02:00
|
|
|
### Quick start
|
|
|
|
|
|
|
|
```sh
|
|
|
|
python3 manga-dlp.py \
|
|
|
|
--url https://mangadex.org/title/a96676e5-8ae2-425e-b549-7f15dd34a6d8/komi-san-wa-komyushou-desu \
|
|
|
|
--language "en" \
|
|
|
|
--chapters "all"
|
|
|
|
```
|
|
|
|
|
2021-12-22 14:42:04 +01:00
|
|
|
### With GitHub
|
2021-12-22 11:28:54 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://github.com/olofvndrhr/manga-dlp.git # clone the repository
|
|
|
|
|
|
|
|
cd manga-dlp # go in the directory
|
|
|
|
|
2021-12-22 14:35:07 +01:00
|
|
|
pip install -r requirements.txt # install required packages
|
|
|
|
|
2021-12-22 11:28:54 +01:00
|
|
|
# on windows
|
|
|
|
python manga-dlp.py <options>
|
|
|
|
# on unix
|
|
|
|
python3 manga-dlp.py <options>
|
|
|
|
```
|
|
|
|
|
2022-06-22 20:01:30 +02:00
|
|
|
### With pip ([pypi](https://pypi.org/project/manga-dlp/))
|
|
|
|
|
|
|
|
```sh
|
|
|
|
python3 -m pip install manga-dlp # download the package from pypi
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-06-22 20:01:30 +02:00
|
|
|
python3 -m mangadlp <args> # start the script as a module
|
|
|
|
OR
|
|
|
|
manga-dlp <args> # call script directly
|
|
|
|
OR
|
|
|
|
mangadlp <args> # call script directly
|
|
|
|
```
|
2021-12-22 11:28:54 +01:00
|
|
|
|
|
|
|
### With docker
|
|
|
|
|
2022-08-15 13:47:16 +02:00
|
|
|
See the docker [README](https://manga-dlp.ivn.sh/docker/)
|
2021-12-22 11:28:54 +01:00
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
```txt
|
2022-12-29 18:13:19 +01:00
|
|
|
Usage: manga-dlp.py [OPTIONS]
|
2022-05-16 16:09:17 +02:00
|
|
|
|
|
|
|
Script to download mangas from various sites
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-12-29 18:13:19 +01:00
|
|
|
Options:
|
|
|
|
--help Show this message and exit.
|
|
|
|
--version Show the version and exit.
|
|
|
|
source: [mutually_exclusive, required]
|
2023-02-06 15:34:40 +01:00
|
|
|
-u, --url, --uuid TEXT URL or UUID of the manga
|
|
|
|
--read FILE Path of file with manga links to download. One per line
|
2022-12-29 18:13:19 +01:00
|
|
|
verbosity: [mutually_exclusive]
|
2023-02-06 15:34:40 +01:00
|
|
|
--loglevel INTEGER Custom log level
|
|
|
|
--warn Only log warnings and higher
|
|
|
|
--debug Debug logging. Log EVERYTHING
|
2022-12-29 18:13:19 +01:00
|
|
|
-c, --chapters TEXT Chapters to download
|
|
|
|
-p, --path PATH Download path [default: downloads]
|
|
|
|
-l, --language TEXT Manga language [default: en]
|
|
|
|
--list List all available chapters
|
2023-02-15 16:02:24 +01:00
|
|
|
--format [cbz|cbr|zip|pdf|] Archive format to create. An empty string means don't archive the folder [default: cbz]
|
2023-02-06 15:34:40 +01:00
|
|
|
--name-format TEXT Naming format to use when saving chapters. See docs for more infos [default: {default}]
|
|
|
|
--name-format-none TEXT String to use when the variable of the custom name format is empty
|
2022-12-29 18:13:19 +01:00
|
|
|
--forcevol Force naming of volumes. For mangas where chapters reset each volume
|
|
|
|
--wait FLOAT Time to wait for each picture to download in seconds(float) [default: 0.5]
|
|
|
|
--hook-manga-pre TEXT Commands to execute before the manga download starts
|
|
|
|
--hook-manga-post TEXT Commands to execute after the manga download finished
|
|
|
|
--hook-chapter-pre TEXT Commands to execute before the chapter download starts
|
|
|
|
--hook-chapter-post TEXT Commands to execute after the chapter download finished
|
2023-02-06 15:34:40 +01:00
|
|
|
--cache-path PATH Where to store the cache-db. If no path is given, cache is disabled
|
2023-02-15 14:21:45 +01:00
|
|
|
--add-metadata / --no-metadata Enable/disable creation of metadata via ComicInfo.xml [default: add-metadata]
|
2021-12-22 11:28:54 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Contribution / Bugs
|
|
|
|
|
|
|
|
For suggestions for improvement, just open a pull request.
|
|
|
|
|
|
|
|
If you want to add support for a new site, there is an api [template file](./contrib/api_template.py) which you can use.
|
2022-06-25 14:29:09 +02:00
|
|
|
And more infos and tools in the contrib [README.md](contrib/README.md)
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-06-25 14:29:09 +02:00
|
|
|
Otherwise, you can open am issue with the name of the site which you want support for. (not guaranteed to be
|
|
|
|
implemented)
|
2021-12-22 11:28:54 +01:00
|
|
|
|
2022-06-25 14:29:09 +02:00
|
|
|
If you encounter any bugs, also just open an issue with a description of the problem.
|
2021-12-22 11:28:54 +01:00
|
|
|
|
|
|
|
## TODO's
|
2022-05-09 15:50:22 +02:00
|
|
|
|
2022-05-16 16:09:17 +02:00
|
|
|
- <del>Make docker container for easy distribution</del>
|
2022-05-09 15:50:22 +02:00
|
|
|
--> [Dockerhub](https://hub.docker.com/repository/docker/olofvndrhr/manga-dlp)
|
2022-05-16 16:09:17 +02:00
|
|
|
- <del>Automate release</del>
|
2022-05-13 11:49:13 +02:00
|
|
|
--> Done with woodpecker-ci
|
2022-06-22 20:01:30 +02:00
|
|
|
- <del>Make pypi package</del>
|
|
|
|
--> Done with release [2.1.7](https://pypi.org/project/manga-dlp/)
|
2022-05-16 16:09:17 +02:00
|
|
|
- Add more supported sites
|