Metadata-Version: 2.4
Name: mangapy
Version: 4.0.1
Summary: Manga downloader
Author-email: Alessandro Marzoli <alessandromarzoli@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/alemar11/mangapy
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: End Users/Desktop
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4>=4.15.0
Requires-Dist: img2pdf>=0.6.3
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: requests>=2.34.2
Requires-Dist: tqdm>=4.68.3
Dynamic: license-file

# mangapy

Manga downloader supporting the following sources:

- fanfox.net
- mangadex.org (via api.mangadex.org)

## Installation

```
pipx install mangapy
```

Or, on macOS with Homebrew:

```
brew install alemar11/tap/mangapy
```

## Usage

### Terminal

Mangapy let you download manga chapters as images (default) or pdfs.
Use 'mangapy -h' to get a list of all the availabe options.

Downloads all Bleach chatpers as images inside the *Downloads* folder (from Fanfox source).  

```
mangapy title bleach -a -o ~/Downloads
```

Downloads all Bleach chatpers as a single **.pdf** file inside the *Downloads* folder (from Fanfox source).  

```
mangapy title bleach -a -o ~/Downloads --pdf
```

Downloads Bleach chatper 1 as images inside the *Downloads* folder (from Fanfox source).  

```
mangapy title bleach -c 1 -o ~/Downloads
```

Downloads Bleach chatpers from 0 to 10 (included) as images inside the *Downloads* folder using Fanfox as source.  

```
mangapy title bleach -c 0-10 -o ~/Downloads -s fanfox
```

Disable network retries (useful for benchmarking).

```
mangapy title bleach -c 1 -o ~/Downloads --no-retry
```

Disable progress output.

```
mangapy title bleach -c 1 -o ~/Downloads --no-progress
```

You may need a proxy to download certain manga, to do so use the option *-p or --proxy*:
Downloads the last One Piece chapter as images inside the *Downloads* folder (from Fanfox source) using the proxy during the search.  

```
mangapy title "one piece" -o ~/Downloads -p '{"http": "194.226.34.132:8888", "https": "194.226.34.132:8888"}'
```

### YAML

Mangapy let you download multiple manga chapters as images (default) or pdfs from a *.yaml* file.
For every manga you can choose:
- source (*fanfox*, *mangadex*)
- whether or not save the manga as a single pdf
- which chapter to download (single, range, all, last)
- MangaDex-only options: `translated_language`, `content_rating`, `data_saver`

```
mangapy yaml PATH_TO_YOUR_YAML_FILE
```

Samples for YAML mode live in `samples/`. For local testing from source, run:

```
uv run python3 scripts/dev_run.py <sample-filename.yaml>
```

```yaml
--- 
 debug: true # optional
 no_retry: false # optional, disable retries
 no_progress: false # optional, disable progress output
 output: "~/Downloads/mangapy"
 proxy: # optional
  http: "http://31.14.131.70:8080"
  https: "http://31.14.131.70:8080" 
 downloads:
  - source: "fanfox"
    title: "bleach"
    pdf: true
    download_single_chapter: "10"
    no_retry: true
  - source: "fanfox"
    title: "naruto"
    pdf: true
    download_chapters: "10-13"
  - source: "mangadex"
    title: "blue lock"
    translated_language: ["en"]
    content_rating: ["safe", "suggestive", "erotica"]
    data_saver: false
    download_all_chapters: true
```
