Skip to main content

A library to interact with comic archives

Project description

Darkseid

PyPI - Version PyPI - Python Ruff Pre-Commit

A Python library to interact with comic archives.

Installation

pip install darkseid

There are optional dependencies which can be installed by specifying one or more of them in braces e.g. darkseid[7zip]

The optional dependencies are:

  • 7zip: Provides support for reading/writing to CB7 files.

  • pillow: Provides support for getting page information that is used with ComicInfo.xml metadata.

  • pdf: Provides support for reading/writing metadata in PDF comics and exporting them to CBZ format.

    The pymupdf dependency includes pre-built wheels for most platforms. On some platforms (e.g., Linux ARM, Windows), installation may require libstdc++ and C/C++ build tools to compile libmupdf. See the pymupdf documentation for details.

Example

from pathlib import Path
from darkseid.comic import Comic, MetadataFormat

comic = Comic(Path("my_comic.cbz"))

# Check if it's a valid comic
if comic.is_valid_comic():
    print(f"Comic '{comic.name}' has {comic.get_number_of_pages()} pages")

# Read metadata
if comic.has_metadata(MetadataFormat.COMIC_INFO):
    metadata = comic.read_metadata(MetadataFormat.COMIC_INFO)
    print(f"Series: {metadata.series.name}")

# Get a page
page_data = comic.get_page(0)  # First page
if page_data:
    with open("cover.jpg", "wb") as f:
        f.write(page_data)

Documentation

Read the project documentation

Bugs/Requests

Please use the GitHub issue tracker to submit bugs or request features.

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

darkseid-8.0.0.tar.gz (114.2 kB view details)

Uploaded Source

Built Distribution

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

darkseid-8.0.0-py3-none-any.whl (93.3 kB view details)

Uploaded Python 3

File details

Details for the file darkseid-8.0.0.tar.gz.

File metadata

  • Download URL: darkseid-8.0.0.tar.gz
  • Upload date:
  • Size: 114.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for darkseid-8.0.0.tar.gz
Algorithm Hash digest
SHA256 02cabb12f29853822d6bc936e1b3583bd18395cca68cb503aff7ef394dd7c025
MD5 c546d1fccb03bb1e4ea57b7d43b89246
BLAKE2b-256 6e1028d86702986a04440d759b6d924358e69df5c46f19712932f08a033f663c

See more details on using hashes here.

File details

Details for the file darkseid-8.0.0-py3-none-any.whl.

File metadata

  • Download URL: darkseid-8.0.0-py3-none-any.whl
  • Upload date:
  • Size: 93.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for darkseid-8.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d8dd4dde132b4b5e5490a58f0a404178244cda4ab67eaf429885888e02d2c53
MD5 fdc0abc0dbd62eb6176237512f6dc145
BLAKE2b-256 c4202860c2be0a06df88788a223625fad675567348d48f71f99500fc4a60323e

See more details on using hashes here.

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