Skip to main content

Anime video filename parser (Python bindings for the anitomy-ng Rust crate)

Project description

anitomy-ng

CI crates.io docs.rs PyPI License: MPL 2.0

A pure-Rust port of erengy/anitomy, an anime video filename parser, with Python bindings. No unsafe, no C dependencies.

[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv

parses into release group, title, year, episode, resolution, video/audio codec, release version, and file checksum — see the examples below.

Status: conformance-tested against upstream's own bundled test data (the current C++ rewrite on the develop branch and the original, long-frozen master implementation), plus the anitopy Python port's fixtures. On each suite it scores at least as high as that suite's reference parser, run as a compiled/installed binary rather than judged from its source.

Install

Rust:

cargo add anitomy-ng

Python (wheels built via maturin):

pip install anitomy-ng

Usage

Rust:

let elements = anitomy_ng::parse(
    "[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv",
    anitomy_ng::Options::default(),
);
for element in &elements {
    println!("{:?}: {}", element.kind, element.value);
}

Python:

import anitomy_ng

for element in anitomy_ng.parse(
    "[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv"
):
    print(element.kind, element.value)

Both return an ordered list of elements (position in the filename, kind, and value); ElementKind/kind covers title, episode, season, release group, video/audio terms, resolution, checksum, and so on — see anitomy/src/element.rs for the full set.

Layout

anitomy/       core Rust crate (published as `anitomy-ng`) — no unsafe, no non-dev dependencies
anitomy-py/    Python bindings (pyo3 + maturin, published as `anitomy-ng`), typed:
               ElementKind is a real enum.Enum, Element a real dataclass
third_party/   vendored upstream test fixtures, not compiled — see third_party/README.md
scripts/       fixture-generation tooling

Development

cargo test -p anitomy-ng --test conformance     # Rust conformance suite
cd anitomy-py && uv run --extra test pytest tests/ -q   # Python conformance suite

License

Licensed under the Mozilla Public License 2.0 — see LICENSE.

This project builds on the following, all MPL-2.0, and is distributed under the same license accordingly:

  • erengy/anitomy (© Eren Okka) — the C++ implementation this project is a port of.
  • Rapptz/anitomy-rs (© Rapptz) — an independent Rust reimplementation; some logic and beyond-upstream keywords are adapted from it.
  • igorcmoura/anitopy (© Igor C. Moura) — its test data (table.py/failing_table.py) is used as a conformance fixture suite.

third_party/ vendors this upstream material under their own MPL-2.0 licenses — see third_party/README.md.

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

anitomy_ng-1.0.0.tar.gz (103.1 kB view details)

Uploaded Source

Built Distributions

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

anitomy_ng-1.0.0-cp39-abi3-win_amd64.whl (775.2 kB view details)

Uploaded CPython 3.9+Windows x86-64

anitomy_ng-1.0.0-cp39-abi3-win32.whl (686.0 kB view details)

Uploaded CPython 3.9+Windows x86

anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

anitomy_ng-1.0.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.8 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file anitomy_ng-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for anitomy_ng-1.0.0.tar.gz
Algorithm Hash digest
SHA256 68eaa0634d682169bae41c1b49a7dfd8a01f00d25adef0ef7f2745e720e3d9ed
MD5 d4266391c0d9b32303eab83826d1be6f
BLAKE2b-256 c39af3bae67cc7a2988727a8bf7705c676e20f2e9f013430c556ee97d9cf5c63

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.0.tar.gz:

Publisher: release.yml on tylergibbs2/anitomy-ng

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

File details

Details for the file anitomy_ng-1.0.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: anitomy_ng-1.0.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 775.2 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for anitomy_ng-1.0.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a8f4842241e0d7fef8d93c2075d7836e14f66982e813475a28978221be00c3b3
MD5 e1015aef67f17fc2e57340f6f83fa559
BLAKE2b-256 e27c7d0a0b8f156bf70c20ef55733f495c4cf418d2491f5d2b5b65d5526dd2d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on tylergibbs2/anitomy-ng

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

File details

Details for the file anitomy_ng-1.0.0-cp39-abi3-win32.whl.

File metadata

  • Download URL: anitomy_ng-1.0.0-cp39-abi3-win32.whl
  • Upload date:
  • Size: 686.0 kB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for anitomy_ng-1.0.0-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 b90fced3ec601d3ad2931fd890ed826d87be3004c242737344467a6870ee03e0
MD5 9ac27c809c80bee5ad0c919a206e14d4
BLAKE2b-256 3d021c87984faf9e6f7405d01ecc978f552ba178ba767c525a4c5711f94d5999

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.0-cp39-abi3-win32.whl:

Publisher: release.yml on tylergibbs2/anitomy-ng

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

File details

Details for the file anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8dcf0b675b9b1c75189e9dc8d8028ddf80c86a149b9cd1848a276da258c14d91
MD5 5180727c12f51aef1fda3b7908edc752
BLAKE2b-256 d401a380ec9b4d81d8ac733bd1dcb299196d39b5615e013c3074ae271f72738e

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tylergibbs2/anitomy-ng

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

File details

Details for the file anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7e1d8bc47051f5693b7c4d356836dfc930d5ac029f9d2a5136f4bbafd1b9cdac
MD5 09aa5fd1f0f25541431092c0041a2c90
BLAKE2b-256 4f5ef6a94cdb554cfc0d9ca5f73fa3fd223f161455603dc23e08da9be66c6115

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on tylergibbs2/anitomy-ng

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

File details

Details for the file anitomy_ng-1.0.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for anitomy_ng-1.0.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e9f7b0f72a00d4f1eb281c1cd6e54d8eb74e85a770b8232d813780f9e83f6496
MD5 fadaee600a6a211e3a404c88d7e0e933
BLAKE2b-256 7b06834663af7f8e2da48d6710326577fa03239a32c10cf391af41c788009c51

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on tylergibbs2/anitomy-ng

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