Skip to main content

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

  1. Installation
    1.1 Install from Source
    1.2 Install from Distribution Package
  2. Usage CLI
    2.1 Commands
  3. Using MangaDM as a Library
    3.1 Example Usage
    3.2 Parameters
  4. Example JSON Structure
    4.1 Structure Breakdown
    4.2 Adding More Entries
  5. Contributing
    5.1 Bug Reports & Feature Requests
  6. 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:

  1. Clone the repository:

    git clone https://github.com/xMohnad/MangaDM.git
    cd MangaDM
    
  2. 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.gz file:

    pip install dist/MangaDM*.tar.gz
    
  • For .whl file:

    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 -1 for 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 on FormatType enum).
    • --transient/--no-transient, -t: Enable or disable transient mode.
    • --update-details/--no-update-details, -u: Update details.json and 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 --version flag.
  • Completion: The CLI supports shell completion using auto_click_auto. The --autocomplete flag is available to enable shell completion for the default shell.
  • More: Use --help flag 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): If True, re-download files even if they exist. Defaults to False.
  • delete_on_success (bool): If True, 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): If True, 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mangadm-0.6.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

MangaDM-0.6.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

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

Hashes for mangadm-0.6.0.tar.gz
Algorithm Hash digest
SHA256 7fe72a40525c1e9d35ba57a452839e3482aa6c87701549cabb6d0f81389884b8
MD5 82882e6a5c0e40cea4df6f7c761872f9
BLAKE2b-256 3b5fc4bbb34f3d5ebe7d8293ed76dbac7b1885316b597382e9e3ad49352b7b9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mangadm-0.6.0.tar.gz:

Publisher: python-publish.yml on xMohnad/MangaDM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for MangaDM-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10174718414f9175747779738beeff29eafb617e4db83947419f47c7715aecec
MD5 56a7f7ec6ae25d436851103bfdc98a3b
BLAKE2b-256 2eb6306be3876856fec8dacdbef6888e99e309480f8f12a5c953b063506220e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for MangaDM-0.6.0-py3-none-any.whl:

Publisher: python-publish.yml on xMohnad/MangaDM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page