Anime video filename parser (Python bindings for the anitomy-ng Rust crate)
Project description
anitomy-ng
A pure-Rust port of erengy/anitomy, an
anime video filename parser, with Python, JavaScript, and .NET bindings. The
core library is pure safe Rust — 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
Command line — prebuilt binaries for Linux, macOS, and Windows are attached to each GitHub release. Download one directly, or install with either:
cargo binstall anitomy-ng # prebuilt binary, no toolchain needed
cargo install anitomy-ng --features cli # builds from source
.NET (prebuilt native binaries ship in the package — no Rust toolchain needed):
dotnet add package AnitomyNg
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);
}
C# / .NET:
using AnitomyNg;
foreach (var element in Anitomy.Parse(
"[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv"))
{
Console.WriteLine($"{element.Kind}: {element.Value}");
}
They all 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.
Command line (anitomy) — takes filenames as arguments or reads them from
stdin (one per line), and prints an aligned table or, with --json, an array
of { filename, elements }:
anitomy '[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv'
ls *.mkv | anitomy --json
Pass --no-title, --no-episode, etc. to disable individual categories; see
anitomy --help.
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
anitomy-js/ JavaScript/TypeScript bindings (wasm-bindgen, published to npm as `anitomy-ng`)
anitomy-c/ C ABI (cdylib/staticlib) over the core — the only crate with `unsafe`;
the foundation for non-Rust bindings
bindings/csharp/ .NET bindings (P/Invoke over anitomy-c, published to NuGet as `AnitomyNg`)
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
Built Distributions
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 anitomy_ng-1.0.3.tar.gz.
File metadata
- Download URL: anitomy_ng-1.0.3.tar.gz
- Upload date:
- Size: 117.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e8e693f79de735c555348faa5bb83c50d1e31b8d0736e2a26331bc177c175da
|
|
| MD5 |
67e4c752099a5211702fdf1c52aae259
|
|
| BLAKE2b-256 |
097bf0606b4e5beb3322e0ba2c29783bee39df8151bd2001200d6166ae4d6280
|
Provenance
The following attestation bundles were made for anitomy_ng-1.0.3.tar.gz:
Publisher:
release.yml on tylergibbs2/anitomy-ng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anitomy_ng-1.0.3.tar.gz -
Subject digest:
2e8e693f79de735c555348faa5bb83c50d1e31b8d0736e2a26331bc177c175da - Sigstore transparency entry: 2109270144
- Sigstore integration time:
-
Permalink:
tylergibbs2/anitomy-ng@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tylergibbs2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anitomy_ng-1.0.3-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: anitomy_ng-1.0.3-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 419.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2a34a4eff29e0c1be13b2a79cac6ce85d39e8e6508c7eafff0d1500fd72a452
|
|
| MD5 |
6e138a2c5bdc2e25b559330690f6549a
|
|
| BLAKE2b-256 |
8297ae730e68a12e372795cdcfbcc4197d712923b1a4f45826e56d30297586a6
|
Provenance
The following attestation bundles were made for anitomy_ng-1.0.3-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on tylergibbs2/anitomy-ng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anitomy_ng-1.0.3-cp39-abi3-win_amd64.whl -
Subject digest:
f2a34a4eff29e0c1be13b2a79cac6ce85d39e8e6508c7eafff0d1500fd72a452 - Sigstore transparency entry: 2109270421
- Sigstore integration time:
-
Permalink:
tylergibbs2/anitomy-ng@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tylergibbs2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anitomy_ng-1.0.3-cp39-abi3-win32.whl.
File metadata
- Download URL: anitomy_ng-1.0.3-cp39-abi3-win32.whl
- Upload date:
- Size: 388.6 kB
- Tags: CPython 3.9+, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73c06ccb97047bba456ba12025238f8fc538f888584f61defc3973ef8002b6e0
|
|
| MD5 |
55917df5a9535a54bf27512bfaa1c3ab
|
|
| BLAKE2b-256 |
d51997d654103d50a2964afb65b907c2344743a4bc0d658d51f96ee788623cac
|
Provenance
The following attestation bundles were made for anitomy_ng-1.0.3-cp39-abi3-win32.whl:
Publisher:
release.yml on tylergibbs2/anitomy-ng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anitomy_ng-1.0.3-cp39-abi3-win32.whl -
Subject digest:
73c06ccb97047bba456ba12025238f8fc538f888584f61defc3973ef8002b6e0 - Sigstore transparency entry: 2109270700
- Sigstore integration time:
-
Permalink:
tylergibbs2/anitomy-ng@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tylergibbs2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 591.2 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
455dd9691f2ae42d6540439b8617885a9a7aba67c597e6c1e738ce5c90a11b9a
|
|
| MD5 |
df013c8ce3673392b42704a4c3355ce4
|
|
| BLAKE2b-256 |
56280feacc77170352dc7ac7f79498ee50dffa8f65c882091ad9c5fbfc0eb1ce
|
Provenance
The following attestation bundles were made for anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on tylergibbs2/anitomy-ng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
455dd9691f2ae42d6540439b8617885a9a7aba67c597e6c1e738ce5c90a11b9a - Sigstore transparency entry: 2109270266
- Sigstore integration time:
-
Permalink:
tylergibbs2/anitomy-ng@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tylergibbs2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 581.5 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c08e0c61514cdb97be3c334c4f52082871b8e06ae8913b551f33fda3606b62ce
|
|
| MD5 |
8f553788f1402f8a7b66176c52a73c6f
|
|
| BLAKE2b-256 |
3c6d6f11aad8bfaca29a26aa0b720513d959c59d6e65d6ab5d89169c75bacfa4
|
Provenance
The following attestation bundles were made for anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on tylergibbs2/anitomy-ng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anitomy_ng-1.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
c08e0c61514cdb97be3c334c4f52082871b8e06ae8913b551f33fda3606b62ce - Sigstore transparency entry: 2109270907
- Sigstore integration time:
-
Permalink:
tylergibbs2/anitomy-ng@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tylergibbs2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anitomy_ng-1.0.3-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: anitomy_ng-1.0.3-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f64ad07ad0b287f2737501b6c7b0ce341b3cdf5cfa836825b178e8ebb294779
|
|
| MD5 |
a319f3a04643d691825431a6e3c72d57
|
|
| BLAKE2b-256 |
8d079d6e9c8adaf633445996085eda0d5a0dc18cca72af7a9fd8cb71f3f3fd23
|
Provenance
The following attestation bundles were made for anitomy_ng-1.0.3-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on tylergibbs2/anitomy-ng
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anitomy_ng-1.0.3-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
8f64ad07ad0b287f2737501b6c7b0ce341b3cdf5cfa836825b178e8ebb294779 - Sigstore transparency entry: 2109270581
- Sigstore integration time:
-
Permalink:
tylergibbs2/anitomy-ng@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tylergibbs2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cc9e35b7211bca317d8c1f01562cef18fc8d7782 -
Trigger Event:
workflow_dispatch
-
Statement type: