npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

anitomy-ng

v1.0.9

Published

Anime video filename parser — WebAssembly build of the anitomy-ng Rust crate

Downloads

1,020

Readme

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 path

parse treats its input as one flat string, matching upstream — given a path, separators and duplicated folder text end up in the title. parse_path strips a real directory prefix first, and recovers a title that lives only in the parent folder. Both / and \ are recognized on every platform, including UNC and drive-letter roots.

An input with no directory prefix is exactly parse, and a separator inside a title (Fate/stay night) is left alone.

// parse      -> title "My Show/My Show"
// parse_path -> title "My Show"
let elements = anitomy_ng::parse_path(
    "My Show/My Show - 01.mkv",
    anitomy_ng::Options::default(),
);
elements = anitomy_ng.parse_path("My Show/My Show - 01.mkv")
import { parse_path } from "anitomy-ng";
const elements = parse_path("My Show/My Show - 01.mkv");
var elements = Anitomy.ParsePath("My Show/My Show - 01.mkv");

On the command line, --path (-p) does the same:

anitomy --path 'My Show/My Show - 01.mkv'

For a set of related files, prefer parse_together below — it does everything parse_path does, plus uses what varies across the 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.