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 🙏

© 2024 – Pkg Stats / Ryan Hefner

anitomy-js

v5.4.0

Published

Node.js wrapper for anitomy

Downloads

30

Readme

anitomy-js

Actions Status GitHub license

anitomy-js is a Node.js wrapper for Anitomy - a C++ library for parsing anime video filenames.

Requirements

  • Linux: gcc/g++ >= 5
  • Windows: Visual Studio >= 2015 (With C++ build tools)
  • Mac OS >= 10.9 (with Xcode installed, of course)

Installation

With npm do:

npm install anitomy-js

anitomy-js builds it's dependencies upon installation. Please refer to the node-gyp documentation if you're having problems with the build.

Version 1.x

Starting with version 1.0 the minimum supported Node version is 0.12

Changes from version 2.x

Starting with version 2.0, anitomy-js requires C++ 14 and at least Node 4:

  • Linux: GCC/G++ >= 5
  • Windows: Visual Studio >= 2015
  • Mac OS >= 10.9

If you can't update your build tools, all versions from 1.x are compatible with C++ 11.

Changes from version 3.x

Starting with version 3.0 the old callback style with a single argument is deprecated. You should switch to either use the Promise API or a node style callback (err, data). The minimum supported Node version is 6.

Changes from version 4.x

4.x is a complete rewrite from scratch and requires at least Node 8. The old callback style API was completely removed and now the async methods (parse and parseAsync) exposes only the Promise API.

Changes from version 5.x

On version 5.x, anitomy-js switched from using NAN, to the newer NAPI. With this change, all context-related issues should be fixed.

Usage

anitomy-js provides two methods: parse and parseSync. Both methods accept single filename input or an array of filenames for batch parsing.

Additionally you can pass an object as the last parameter to change Anitomy's original parsing options. The options are:

  • allowed_delimiters - defaults to " _.&+,|"
  • ignored_strings - defaults to []
  • parse_episode_number - defaults to true
  • parse_episode_title - defaults to true
  • parse_file_extension - defaults to true
  • parse_release_group - defaults to true

parse(data, [options]) -> Promise<AnitomyResult | AnitomyResult[]>

var anitomy = require('anitomy-js')
anitomy
  .parse('[tlacatlc6] Natsume Yuujinchou Shi Vol. 1v2 & Vol. 2 (BD 1280x720 x264 AAC)')
  .then((data) => console.log(data))

... would be parsed into

{
  "anime_title": "Natsume Yuujinchou Shi",
  "audio_term": "AAC",
  "file_name": "[tlacatlc6] Natsume Yuujinchou Shi Vol. 1v2 & Vol. 2 (BD 1280x720 x264 AAC)",
  "release_group": "tlacatlc6",
  "release_version": "2",
  "source": "BD",
  "video_term": "x264",
  "video_resolution": "1280x720",
  "volume_number": ["1", "2"]
}

parseSync(data, [options]) -> AnitomyResult | AnitomyResult[]

var anitomy = require('anitomy-js')
var filenames = [
  '[DmonHiro] Magi - The Labyrinth Of Magic - Vol.1v2 (BD, 720p)',
  '[KLF]_D.Gray-man_04V2.avi',
]
console.log(anitomy.parseSync(filenames))

... would be parsed into

[
  {
    "anime_title": "Magi - The Labyrinth Of Magic",
    "file_name": "[DmonHiro] Magi - The Labyrinth Of Magic - Vol.1v2 (BD, 720p)",
    "release_group": "DmonHiro",
    "release_version": "2",
    "source": "BD",
    "video_resolution": "720p",
    "volume_number": "1"
  },
  {
    "anime_title": "D.Gray-man",
    "episode_number": "04",
    "file_extension": "avi",
    "file_name": "[KLF]_D.Gray-man_04V2",
    "release_group": "KLF",
    "release_version": "2"
  }
]

License

Licensed under the incredibly permissive MIT license