No project description provided
Project description
MangaDM - Manga Download Manager
MangaDM is a command-line tool and Python library for downloading manga chapters based on the metadata specified in a JSON file.
Table of Contents
- Installation
1.1 Install from Source
1.2 Install from Distribution Package - Usage CLI
2.1 Commands - Using MangaDM as a Library
3.1 Example Usage
3.2 Parameters - Example JSON Structure
4.1 Structure Breakdown
4.2 Adding More Entries - Contributing
5.1 Bug Reports & Feature Requests - License
Installation
Before installing MangaDM, ensure that Python is installed on your system. You can then install MangaDM via one of the following methods:
Install from Source
To install MangaDM from the source code:
-
Clone the repository:
git clone https://github.com/xMohnad/MangaDM.git cd MangaDM
-
Install the tool:
pip install .
Install from Distribution Package
You can install MangaDM using the pip tool from a .tar.gz or .whl distribution package:
-
For
.tar.gzfile:pip install dist/MangaDM*.tar.gz
-
For
.whlfile:pip install dist/MangaDM*py3-none-any.whl
This will install MangaDM from the specified package located in the dist directory.
Usage CLI
Once installed, you can use the mangadm command to download manga chapters.
Commands
download
- Purpose: Downloads manga chapters based on a provided JSON file.
- Arguments:
json_file: Path to the JSON file containing manga download details.
- Options:
--dest, -p: Destination path for downloading manga (default is the current directory).--limit, -l: Number of chapters to download (default is-1for all chapters).--force/--no-force, -f: Force re-download of incomplete images.--delete/--no-delete, -d: Delete data after successful download.--format, -m: Format for downloaded manga (choices are based onFormatTypeenum).--transient/--no-transient, -t: Enable or disable transient mode.--update-details/--no-update-details, -u: Updatedetails.jsonand re-download cover.
configure
- Purpose: Opens a configuration UI for setting up MangaDM options.
example
- Purpose: Displays an example JSON structure.
view
- Purpose: Views the current configuration settings.
General Notes
- Versioning: The version is displayed with the
--versionflag. - Completion: The CLI supports shell completion using
auto_click_auto. The--autocompleteflag is available to enable shell completion for the default shell. - More: Use
--helpflag in any of the commands.
Using MangaDM as a Library
You can also use MangaDM as a Python library. Here’s how you can use it programmatically:
Example Usage
from mangadm import MangaDM
# Create an instance of MangaDM with desired parameters
mangadm = MangaDM(
json_file="path/to/yourfile.json",
dest_path="path/to/chapter",
limit=1,
delete_on_success=False,
force_download=False,
format="cbz", # ["cbz", "epub"]
transient=True
)
# Start the downloading process
mangadm.start()
Parameters
json_file(Path): The path to the JSON file containing manga data.dest_path(str): The destination path where manga chapters will be downloaded. Defaults to the current directory.limit(int): Number of chapters to download. If -1, download all chapters. Defaults to -1.force_download(bool): IfTrue, re-download files even if they exist. Defaults to False.delete_on_success(bool): IfTrue, delete chapter data from JSON after successful download. Defaults to False.format(Literal["cbz", "epub"]): The format in which to save the downloaded manga. Can be either"cbz"or"epub". Defaults to"cbz".transient(bool): IfTrue, activates transient mode. Defaults to True.
Example JSON Structure
Below is an example of the JSON structure required for the input file:
{
"details": {
"source": "Example Source Name",
"manganame": "Example Manga Name",
"cover": "https://example.com/cover.jpg",
"description": "Example Description",
"genre": ["genre 1", "genre 2", "etc"],
"author": "Akutami Gege",
"artist": "Akutami Gege"
},
"chapters": [
{
"title": "chapter 256 - Example Title",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg",
"https://example.com/image3.jpg",
"https://example.com/image4.jpg",
"etc"
]
},
{
"title": "chapter 257 - Example Title",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg",
"https://example.com/image3.jpg",
"https://example.com/image4.jpg",
"etc"
]
},
{
"title": "chapter 258 - Example Title",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg",
"https://example.com/image3.jpg",
"https://example.com/image4.jpg",
"etc"
]
}
]
}
The JSON structure provided above illustrates the format expected for input files used by the MangaDM tool. Each JSON file should follow these guidelines:
Structure Breakdown
details: Contains metadata about the manga series.source: The source or website where the manga is found.manganame: The name of the manga series.cover: A URL pointing to the cover image of the manga. This is optional but can enhance the metadata.description: A short description of the manga.genre: A list of genres the manga belongs to.author: The name of the author of the manga.artist: The name of the artist responsible for the manga's artwork.
chapters: An array of objects, each representing a chapter in the manga.title: The title or number of the chapter.images: A list of URLs where each URL points to an image file, typically representing the pages of the manga chapter.
Adding More Entries
You can include multiple manga entries, and the MangaDM tool will handle each entry sequentially according to the options provided.
Contributing
Bug Reports and Feature Requests
If you encounter any issues while using MangaDM or have suggestions for new features, you can open an issue on the GitHub repository. Please provide detailed information about the issue or feature request to help in resolving it more effectively.
License
MangaDM is open-source software licensed under the MIT License. This means you can freely use, modify, and distribute the tool, provided you include the original license and copyright notice in any distributions or derivative works.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mangadm-0.6.0.tar.gz.
File metadata
- Download URL: mangadm-0.6.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fe72a40525c1e9d35ba57a452839e3482aa6c87701549cabb6d0f81389884b8
|
|
| MD5 |
82882e6a5c0e40cea4df6f7c761872f9
|
|
| BLAKE2b-256 |
3b5fc4bbb34f3d5ebe7d8293ed76dbac7b1885316b597382e9e3ad49352b7b9a
|
Provenance
The following attestation bundles were made for mangadm-0.6.0.tar.gz:
Publisher:
python-publish.yml on xMohnad/MangaDM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mangadm-0.6.0.tar.gz -
Subject digest:
7fe72a40525c1e9d35ba57a452839e3482aa6c87701549cabb6d0f81389884b8 - Sigstore transparency entry: 158754960
- Sigstore integration time:
-
Permalink:
xMohnad/MangaDM@76804553f049009d831c44c99fcc30f16dfc0b8d -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/xMohnad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@76804553f049009d831c44c99fcc30f16dfc0b8d -
Trigger Event:
push
-
Statement type:
File details
Details for the file MangaDM-0.6.0-py3-none-any.whl.
File metadata
- Download URL: MangaDM-0.6.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10174718414f9175747779738beeff29eafb617e4db83947419f47c7715aecec
|
|
| MD5 |
56a7f7ec6ae25d436851103bfdc98a3b
|
|
| BLAKE2b-256 |
2eb6306be3876856fec8dacdbef6888e99e309480f8f12a5c953b063506220e4
|
Provenance
The following attestation bundles were made for MangaDM-0.6.0-py3-none-any.whl:
Publisher:
python-publish.yml on xMohnad/MangaDM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mangadm-0.6.0-py3-none-any.whl -
Subject digest:
10174718414f9175747779738beeff29eafb617e4db83947419f47c7715aecec - Sigstore transparency entry: 158754961
- Sigstore integration time:
-
Permalink:
xMohnad/MangaDM@76804553f049009d831c44c99fcc30f16dfc0b8d -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/xMohnad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@76804553f049009d831c44c99fcc30f16dfc0b8d -
Trigger Event:
push
-
Statement type: