Metadata-Version: 2.4
Name: mhl-suite
Version: 1.3.0
Summary: Simple MHL verification and sealing tools
Project-URL: Homepage, https://github.com/lucuma13/mhl-suite
Author: Luis Gómez Gutiérrez
License: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Requires-Dist: ascmhl>=1.2
Requires-Dist: lxml>=6.1.1
Requires-Dist: rich>=15
Requires-Dist: xxhash>=3.7
Description-Content-Type: text/markdown

# mhl-suite

[![PyPI Version](https://img.shields.io/pypi/v/mhl-suite.svg)](https://pypi.org/project/mhl-suite/)
![OS](https://img.shields.io/badge/OS-macOS%20%7C%20Windows%20%7C%20Linux-lightgrey)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
[![CI](https://github.com/lucuma13/mhl-suite/actions/workflows/ci.yml/badge.svg)](https://github.com/lucuma13/mhl-suite/actions/workflows/ci.yml)
[![codecov](https://codecov.io/github/lucuma13/mhl-suite/graph/badge.svg?token=X6Z7IRDZ6U)](https://codecov.io/github/lucuma13/mhl-suite)

`mhl-suite` is a toolkit for sealing and verifying MHL files. It consists of two primary executables:

* `mhlver`: one tool to verify them all. A wrapper that verifies MHL files recursively in a directory, with optional XSD schema validation and reporting. It delegates to `simple-mhl` for classic flat MHLs and to [ascmhl](https://github.com/ascmitc/mhl) for ASC-MHL.
* `simple-mhl`: a modern sealing and verification tool, for classic flat MHL files. A successor of the discontinued [mhl-tool](https://github.com/pomfort/mhl-tool) and backwards compatible with its manifests - 2 to 5 times faster, full support for standard `xxhash64be` hashes, XSD schema validation features, cleaner output and structured exit codes.

### 🚀 Installation

1. Install the `uv` package manager with the [official installer](https://docs.astral.sh/uv/getting-started/installation/), or:
* macOS: `brew install uv`
* Windows: `winget install astral-sh.uv`
* Linux (Debian): `apt-get install uv`
<!--
* Linux (RHEL): `yum install uv`
* Linux (SUSE): `zypper install python-uv`
* Linux (Arch): `pacman -S muv`
-->

2. Install the toolkit:

```
uv tool install mhl-suite
```

3. Test the installation (if the command is not recognised try `uv tool update-shell` and restart your terminal):

```
mhlver --version; simple-mhl --version
```

### 📖 Usage examples

Verify MHL files (both classic and ASC-MHL):

```bash
mhlver path/to/file.mhl
mhlver path/to/directory/
mhlver                                     # verify current directory
```

Seal a directory:

```bash
simple-mhl seal path/to/directory/
simple-mhl seal -a md5 path/to/directory/   # use MD5 algorithm
```

Validate XML Schema Definition of a file:

```bash
mhlver --xsd-schema-check path/to/file
```

Run `simple-mhl --help` and `mhlver --help` to see the full list of options.
