pycbzhelper


Namepycbzhelper JSON
Version 3.1.2 PyPI version JSON
download
home_pagehttps://github.com/hyugogirubato/pycbzhelper
SummaryPython library for creating CBZ files with metadata.
upload_time2023-08-13 16:29:22
maintainer
docs_urlNone
authorhyugogirubato
requires_python>=3.7
licenseGPL-3.0-only
keywords metadata manga comics ebooks cbz
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyCBZHelper

[![License](https://img.shields.io/github/license/hyugogirubato/pycbzhelper)](https://github.com/hyugogirubato/pycbzhelper/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release-date/hyugogirubato/pycbzhelper)](https://github.com/hyugogirubato/pycbzhelper/releases)
[![Latest Version](https://img.shields.io/pypi/v/pycbzhelper)](https://pypi.org/project/pycbzhelper/)

PyCBZHelper is a Python library for creating CBZ (Comic Book Zip) files with metadata. It provides functionality to
generate a CBZ file from a list of image pages and associated comic book metadata.

## Features

- Create CBZ files from images.
- Generate ComicInfo.xml metadata.
- Support for various metadata fields.
- Handle page files from local disk or web URLs.
- Automatic cleanup of temporary files.

## Installation

You can install PyCBZHelper using pip:

````shell
pip install pycbzhelper
````

## Usage

Here's a basic example of how to use PyCBZHelper:

````python
from pycbzhelper import Helper
from pathlib import Path

PARENT = Path(__name__).resolve().parent

if __name__ == "__main__":
    # Define metadata for the comic
    metadata = {
        "Title": "My Comic",
        "Series": "Comic Series",
        "Number": "1",
        "Pages": [
            {"File": PARENT / "image1.jpg"},
            {"File": PARENT / "image2.jpg"},
        ]
        # Add more metadata fields here
    }

    # Define the path to the output CBZ file
    output_path = PARENT / "output.cbz"

    # Create an instance of the Helper class
    helper = Helper(metadata)

    # Create the CBZ file
    helper.create_cbz(output_path)
````

For more information on how to use PyCBZHelper, please refer to
the [documentation](https://github.com/hyugogirubato/pycbzhelper/blob/main/docs/schema).

### Exceptions

The following exceptions can be raised by PyCBZHelper:

- `InvalidKeyValue`: Raised when a key value is invalid.
- `MissingPageFile`: Raised when no page files are available.
- `InvalidFileExtension`: Raised when an invalid file extension is used.
- `FileNotFound`: Raised when the specified source file is not found.

### License

This project is licensed under the [GPL v3 License](https://github.com/hyugogirubato/pycbzhelper/blob/main/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hyugogirubato/pycbzhelper",
    "name": "pycbzhelper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "metadata,manga,comics,ebooks,cbz",
    "author": "hyugogirubato",
    "author_email": "hyugogirubato@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/71/df/e538876994ffa669e56edc274d717eda2b4285480e7a41e7bf05ee6e68f8/pycbzhelper-3.1.2.tar.gz",
    "platform": null,
    "description": "# PyCBZHelper\r\n\r\n[![License](https://img.shields.io/github/license/hyugogirubato/pycbzhelper)](https://github.com/hyugogirubato/pycbzhelper/blob/main/LICENSE)\r\n[![Release](https://img.shields.io/github/release-date/hyugogirubato/pycbzhelper)](https://github.com/hyugogirubato/pycbzhelper/releases)\r\n[![Latest Version](https://img.shields.io/pypi/v/pycbzhelper)](https://pypi.org/project/pycbzhelper/)\r\n\r\nPyCBZHelper is a Python library for creating CBZ (Comic Book Zip) files with metadata. It provides functionality to\r\ngenerate a CBZ file from a list of image pages and associated comic book metadata.\r\n\r\n## Features\r\n\r\n- Create CBZ files from images.\r\n- Generate ComicInfo.xml metadata.\r\n- Support for various metadata fields.\r\n- Handle page files from local disk or web URLs.\r\n- Automatic cleanup of temporary files.\r\n\r\n## Installation\r\n\r\nYou can install PyCBZHelper using pip:\r\n\r\n````shell\r\npip install pycbzhelper\r\n````\r\n\r\n## Usage\r\n\r\nHere's a basic example of how to use PyCBZHelper:\r\n\r\n````python\r\nfrom pycbzhelper import Helper\r\nfrom pathlib import Path\r\n\r\nPARENT = Path(__name__).resolve().parent\r\n\r\nif __name__ == \"__main__\":\r\n    # Define metadata for the comic\r\n    metadata = {\r\n        \"Title\": \"My Comic\",\r\n        \"Series\": \"Comic Series\",\r\n        \"Number\": \"1\",\r\n        \"Pages\": [\r\n            {\"File\": PARENT / \"image1.jpg\"},\r\n            {\"File\": PARENT / \"image2.jpg\"},\r\n        ]\r\n        # Add more metadata fields here\r\n    }\r\n\r\n    # Define the path to the output CBZ file\r\n    output_path = PARENT / \"output.cbz\"\r\n\r\n    # Create an instance of the Helper class\r\n    helper = Helper(metadata)\r\n\r\n    # Create the CBZ file\r\n    helper.create_cbz(output_path)\r\n````\r\n\r\nFor more information on how to use PyCBZHelper, please refer to\r\nthe [documentation](https://github.com/hyugogirubato/pycbzhelper/blob/main/docs/schema).\r\n\r\n### Exceptions\r\n\r\nThe following exceptions can be raised by PyCBZHelper:\r\n\r\n- `InvalidKeyValue`: Raised when a key value is invalid.\r\n- `MissingPageFile`: Raised when no page files are available.\r\n- `InvalidFileExtension`: Raised when an invalid file extension is used.\r\n- `FileNotFound`: Raised when the specified source file is not found.\r\n\r\n### License\r\n\r\nThis project is licensed under the [GPL v3 License](https://github.com/hyugogirubato/pycbzhelper/blob/main/LICENSE).\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Python library for creating CBZ files with metadata.",
    "version": "3.1.2",
    "project_urls": {
        "Homepage": "https://github.com/hyugogirubato/pycbzhelper"
    },
    "split_keywords": [
        "metadata",
        "manga",
        "comics",
        "ebooks",
        "cbz"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71dfe538876994ffa669e56edc274d717eda2b4285480e7a41e7bf05ee6e68f8",
                "md5": "52b519a313dab1b87e8e4c7dde9430d1",
                "sha256": "9b4c758f6cdaaf0ed9965affedb576dfeebeee518bb1cb4d3da3a2cfef507df8"
            },
            "downloads": -1,
            "filename": "pycbzhelper-3.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "52b519a313dab1b87e8e4c7dde9430d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18987,
            "upload_time": "2023-08-13T16:29:22",
            "upload_time_iso_8601": "2023-08-13T16:29:22.911369Z",
            "url": "https://files.pythonhosted.org/packages/71/df/e538876994ffa669e56edc274d717eda2b4285480e7a41e7bf05ee6e68f8/pycbzhelper-3.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-13 16:29:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hyugogirubato",
    "github_project": "pycbzhelper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pycbzhelper"
}
        
Elapsed time: 0.12293s