A manga download script written in python. It only supports [mangadex.org](https://mangadex.org/) for now. But support for other sites is planned.
Before downloading the 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.
The default behaiviour is to pack the images to a [cbz archvie](https://en.wikipedia.org/wiki/Comic_book_archive). If you just want the folder with all the pictures use the flag `--nocbz`.
## Usage
### With github
```sh
git clone https://github.com/olofvndrhr/manga-dlp.git # clone the repository
-c CHAPTERS, --chapters CHAPTERS Chapters to download
-p PATH, --path PATH Download path. Defaults to "<script_dir>/downloads"
-l LANG, --language LANG Manga language. Defaults to "en" --> english
--read READ Path of file with manga links to download. One per line
--list List all available chapters. Defaults to false
--nocbz Dont pack it to a cbz archive. Defaults to false
--forcevol Force naming of volumes. For mangas where chapters reset each volume
--wait WAIT Time to wait for each picture to download in seconds(float). Defaults 0.5
--verbose Verbose logging. Defaults to false
```
### Downloads file-structure
```txt
.
└── <downloadpath>/
└── <mangatitle>/
└── <chaptertitle>/
```
#### Example:
```txt
./downloads/mangatitle/chaptertitle(.cbz)
```
### Read list of links from file
With the option `--read` you can specify a file with links to multiple mangas. They will be parsed from top to bottom one at a time. Every link will be matched for the right api to use.
It is important that you only have one link per line, otherwise they can't be parsed.
#### Example:
```txt
# mangas.txt
link1
link2
link3
```
`python3 manga-dlp.py --read mangas.txt --list`
This will list all available chapters for link1, link2 and link3.
### Set download path
With the option `-p/--path` you can specify a path to download the chapters to.