Skip to main content

anitomy-ng

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

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.

Parsing a set together

parse_together parses a set of related filenames at once, returning one element list per input (result i is for input i). Using the whole set as shared context resolves things a single filename can't — most importantly, a directory batch range like (01-12) no longer masks the real per-file episode, and a series title that lives only in a parent folder is recovered. Unrelated or single-item lists are a safe no-op (each is just its ordinary parse). Full and relative paths work on every platform (/ and \, including UNC/drive-letter).

Parsing each of these on its own would read 01 and 12 from the folder's (01-12) range and miss the actual episode; together, they come back as 05 and 06:

Rust:

let results = anitomy_ng::parse_together(
    &[
        "Frieren (01-12) [Batch]/Frieren - 05 [1080p].mkv",
        "Frieren (01-12) [Batch]/Frieren - 06 [1080p].mkv",
    ],
    anitomy_ng::Options::default(),
);
// results[0] -> episode "05", results[1] -> episode "06"

Python:

results = anitomy_ng.parse_together([
    "Frieren (01-12) [Batch]/Frieren - 05 [1080p].mkv",
    "Frieren (01-12) [Batch]/Frieren - 06 [1080p].mkv",
])
# results[0] -> episode "05", results[1] -> episode "06"

JavaScript / TypeScript:

import { parse_together } from "anitomy-ng";

const results = parse_together([
  "Frieren (01-12) [Batch]/Frieren - 05 [1080p].mkv",
  "Frieren (01-12) [Batch]/Frieren - 06 [1080p].mkv",
]);
// results[0] -> episode "05", results[1] -> episode "06"

C# / .NET:

var results = Anitomy.ParseTogether(new[]
{
    "Frieren (01-12) [Batch]/Frieren - 05 [1080p].mkv",
    "Frieren (01-12) [Batch]/Frieren - 06 [1080p].mkv",
});
// results[0] -> episode "05", results[1] -> episode "06"

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.

Release files for anitomy-ng 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anitomy-ng 1.0.4
File Size Uploaded
anitomy_ng-1.0.4.tar.gz 130.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for anitomy-ng 1.0.4
File
anitomy_ng-1.0.4-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
anitomy_ng-1.0.4-cp39-abi3-win32.whl CPython 3.9 abi3 Windows x86-32 Details
anitomy_ng-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
anitomy_ng-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
anitomy_ng-1.0.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.9 abi3 macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 Details

Total release size: 3.2 MB

Release files / anitomy_ng-1.0.4.tar.gz

Download URL anitomy_ng-1.0.4.tar.gz
Size 130.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bbc7b660830693618ea87efe704014afcccbc4caa7bf4c49e1d2ad4a608686cc
BLAKE2b-256 checksum
How to use checksums
57dca059f29d53229f926d0b76287f6657b2678737a5d50f66d7e4edc5fe71fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release files / anitomy_ng-1.0.4-cp39-abi3-win_amd64.whl

Download URL anitomy_ng-1.0.4-cp39-abi3-win_amd64.whl
Size 428.9 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a953083e3df6058d22eb89c17fc664b019de4fd050c43c9edbe8aaa0d519e600
BLAKE2b-256 checksum
How to use checksums
f51710257010f9bd196854441abdc35839ed58ae0cc2dcdfefaea775ca715ff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release files / anitomy_ng-1.0.4-cp39-abi3-win32.whl

Download URL anitomy_ng-1.0.4-cp39-abi3-win32.whl
Size 399.3 kB
Tags CPython 3.9 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
c1da6cabb6622177fd2b4915ea9687086f14d1935b34329d7d9f2d91cf847cdf
BLAKE2b-256 checksum
How to use checksums
c3a4e66a68d335e237c43e2f8462268ab06b2073af829fdf2aa830d96c91d4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release files / anitomy_ng-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL anitomy_ng-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 598.6 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8ff4f5f8a559effd0f9bad93c19bf9c64497f7737384208395bd6a6d668a5f18
BLAKE2b-256 checksum
How to use checksums
6afc67794000c7a9b811e1c24c4533ed46e16f473a06effcf2b39f7a1c6ce54b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release files / anitomy_ng-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL anitomy_ng-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 588.2 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b799e3f89f8ae92aa71455ee2f81f7e20c16529bb6af5c9d6296cc7e50685868
BLAKE2b-256 checksum
How to use checksums
733a8fbe8e52c057a901871c5a818686c687624c64cebeb84e729118e9f8eb82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release files / anitomy_ng-1.0.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL anitomy_ng-1.0.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a6d3de5d6916a4bbc69ec1fbf5365dd6d3d4fde3a9df8ff766a710b4652623ab
BLAKE2b-256 checksum
How to use checksums
ea69c66a02a01386f0a838305c73ccb94a7af17e7119cfdae56dfd70f452f28f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.9

6 release files

1.0.8

6 release files

1.0.7

6 release files

1.0.6

6 release files

1.0.5

6 release files

This release

1.0.4 This release

6 release files

1.0.3

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page