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

JavaScript / TypeScript (WebAssembly, works in Node and bundlers):

npm 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)

JavaScript / TypeScript:

import { parse } from "anitomy-ng";

for (const element of parse(
  "[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv",
)) {
  console.log(element.kind, element.value);
}

All three 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.1.tar.gz (105.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.1-cp39-abi3-win_amd64.whl (411.4 kB view details)

Uploaded CPython 3.9+Windows x86-64

anitomy_ng-1.0.1-cp39-abi3-win32.whl (380.8 kB view details)

Uploaded CPython 3.9+Windows x86

anitomy_ng-1.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (582.4 kB view details)

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

anitomy_ng-1.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (573.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

anitomy_ng-1.0.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.0 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.1.tar.gz.

File metadata

  • Download URL: anitomy_ng-1.0.1.tar.gz
  • Upload date:
  • Size: 105.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.1.tar.gz
Algorithm Hash digest
SHA256 102afdeecfbbbdc25b53c228aeb7add4fff59255d8a9bfe4e5743ec0abf3d320
MD5 d0b0eea736590c6c30ac2f821ab723da
BLAKE2b-256 014c508693b1d4f5b8377bef8451a7e59f929111fe0762c6564f6e211a1c0cd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.1.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.1-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: anitomy_ng-1.0.1-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 411.4 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.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bf130c4854bff381ec1a687cdd0dc9127cf63f36540193966168d4bf271a1c85
MD5 84fbce6df4b4cff013d74b3a3a24566a
BLAKE2b-256 ae0fe3c012f3de0fed6c4ba549698b2a5eeb9e786ef4dd744610dcf9ed4d82cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.1-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.1-cp39-abi3-win32.whl.

File metadata

  • Download URL: anitomy_ng-1.0.1-cp39-abi3-win32.whl
  • Upload date:
  • Size: 380.8 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.1-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 6dbc10c20fa00142bcbeb17f32060936ea15c98c9fca628c2f005c636cbf7168
MD5 8e1e6b657106ee6d5ea1b9fd5b384133
BLAKE2b-256 fcb4ccb3aa49325da332d3284786f8e9b6c4743c048210915772eec2b6a6043b

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.1-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.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for anitomy_ng-1.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b46cf98c8a3ac9f4882ef87f73789e816e86e4fc6e0bf6c39920b807741bc666
MD5 a4aeea3491e8c8fa0666e0cf9188eaed
BLAKE2b-256 ebfe9f3fc47d50b487983eb04d95cde18b904fcb52cd768f90bf34c1f7509171

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.1-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.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for anitomy_ng-1.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 21fce7e9b75e2ce6668c27032de52969aa6138e1e41d91aaf260cd17b800777d
MD5 8df01849965e815de967f87924c4ec6e
BLAKE2b-256 b31423c32c48dd1af7efb06741c0667fb7ad45086b81a4fe89b5bf0654aceb79

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.1-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.1-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.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 6b1f09b3c22bfca5cf04f70dd243293b69813b82b7374da8d79f8df27b7cb67b
MD5 2d3f4b7a57bf5fa3aeaf14da9db7c224
BLAKE2b-256 b8eff088cac153525f843a06c98796e33d5e2d3ec7216db970bb28a64e17b3d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for anitomy_ng-1.0.1-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