Skip to main content

A regex-based Python library to parse scene release names and extract technical metadata

Project description

Releascenify

Releascenify Logo

Parse Scene and P2P release names into structured metadata and compare release quality automatically. Built with a rule/regex engine.

Live Demo: https://dmachard.github.io/releascenify/docs/

Why?

Release names follow a strict grammar inherited from the Scene and P2P groups. Once decoded, you can predict the quality, source, language, and release group just from the filename. This library is an alternative to PTN (Parse Torrent Name).

Installation

pip install releascenify

Usage

from releascenify import parse_filename
from releascenify.comparator import get_quality_score, is_better_release

filename = "Gladiator.II.2024.MULTi.2160p.WEB-DL.DV.HDR.H265-GROUP"
parsed = parse_filename(filename)

print(parsed)
# {
#   "title": "Gladiator II",
#   "year": 2024,
#   "resolution": "2160P",
#   "quality": "WEB-DL",
#   "v_quality": "HDR DV",
#   "codec": "H265",
#   "languages": ["MULTI"]
#   ...
# }

# Calculate quality score
score = get_quality_score(parsed)
print(f"Quality Score: {score}")

# Compare two releases
rel_a = parse_filename("Gladiator.II.2024.1080p.BluRay.x264-GROUP")
rel_b = parse_filename("Gladiator.II.2024.2160p.WEB-DL.x265-GROUP")

if is_better_release(rel_b, rel_a):
    print("Release B is better than Release A")

Quality Scoring

For details on how files are rated, scoring weights, and priority factors, see SCORING.md.

Development & Tests

Setup Local Virtual Environment

To set up the development environment, create a virtual environment and install the package in editable mode with development dependencies:

virtualenv .venv
source .venv/bin/activate
pip install -e .[dev]

Run Tests

Run the test suite using pytest:

pytest tests/ -v

Run Website Locally

You need to run a local web server from the repository root:

# Start a local HTTP server
python3 -m http.server 8000

Then navigate to: http://localhost:8000/ (which redirects to /docs/) or directly to http://localhost:8000/docs/.

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

releascenify-0.3.0.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

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

releascenify-0.3.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file releascenify-0.3.0.tar.gz.

File metadata

  • Download URL: releascenify-0.3.0.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for releascenify-0.3.0.tar.gz
Algorithm Hash digest
SHA256 44860242efb2eb7595b241d3d47a074f5218d1add06974237fef1666130317d6
MD5 159ad45eaebf98a5ae651fbc1c8299df
BLAKE2b-256 01fedb408dd99bc7081ccf35d3dfbca895705b9aea44d2b0b1e0ff4999069ce5

See more details on using hashes here.

Provenance

The following attestation bundles were made for releascenify-0.3.0.tar.gz:

Publisher: publish.yml on dmachard/releascenify

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

File details

Details for the file releascenify-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: releascenify-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for releascenify-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f29d1396e9bfd858ce2c5581e7d7dc0a95c1e93259608c41bd6e480b83a1270b
MD5 57bed0c73bd117434b3b2a9c3b8994f5
BLAKE2b-256 d90c3523a62b4cb28013cb51c5f4e1943998e72755f4a748fb8a0c186bf87c84

See more details on using hashes here.

Provenance

The following attestation bundles were made for releascenify-0.3.0-py3-none-any.whl:

Publisher: publish.yml on dmachard/releascenify

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