A regex-based Python library to parse scene release names and extract technical metadata
Project description
Releascenify
Parse Scene and P2P release names into structured metadata and compare release quality automatically. Built with a rule/regex engine.
Live Demo & Web Interface: 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:
# Create the virtual environment
virtualenv .venv
# Activate the virtual environment
source .venv/bin/activate
# Install the package in editable/development mode
pip install -e .[dev]
Run Tests
Run the test suite using pytest:
pytest tests/ -v
Run Website Locally
Due to browser CORS security policies, opening the HTML files directly as a local file (via file://) will block loading the relative Python files. 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
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 releascenify-0.2.0.tar.gz.
File metadata
- Download URL: releascenify-0.2.0.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
402a7970a61d0340a19c780228a30d08cba22ec4cc6892b89ad0d04ecf39c612
|
|
| MD5 |
23d4b360edf586b718ccccfbd81c289d
|
|
| BLAKE2b-256 |
b57f7521cf5ef953a2720e0fd8aaecc0cf64e46b1c2afe70c57bb24b79533513
|
Provenance
The following attestation bundles were made for releascenify-0.2.0.tar.gz:
Publisher:
publish.yml on dmachard/releascenify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
releascenify-0.2.0.tar.gz -
Subject digest:
402a7970a61d0340a19c780228a30d08cba22ec4cc6892b89ad0d04ecf39c612 - Sigstore transparency entry: 1632809709
- Sigstore integration time:
-
Permalink:
dmachard/releascenify@be47ccbaa2bf4f7c362d8e8faae798622118705c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dmachard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be47ccbaa2bf4f7c362d8e8faae798622118705c -
Trigger Event:
release
-
Statement type:
File details
Details for the file releascenify-0.2.0-py3-none-any.whl.
File metadata
- Download URL: releascenify-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb21b366eedde24a22c0db02baf8dd33f639a6ad11cfe130e3733e90352beeac
|
|
| MD5 |
aa876421b5031f5ff0323dfd9963b99f
|
|
| BLAKE2b-256 |
894d4f4aab0c53970963c7601188f2be7e5deb164fc4ac4937c5fb86fc312560
|
Provenance
The following attestation bundles were made for releascenify-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dmachard/releascenify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
releascenify-0.2.0-py3-none-any.whl -
Subject digest:
bb21b366eedde24a22c0db02baf8dd33f639a6ad11cfe130e3733e90352beeac - Sigstore transparency entry: 1632809715
- Sigstore integration time:
-
Permalink:
dmachard/releascenify@be47ccbaa2bf4f7c362d8e8faae798622118705c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dmachard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be47ccbaa2bf4f7c362d8e8faae798622118705c -
Trigger Event:
release
-
Statement type: