Giter Club home page Giter Club logo

atm's Introduction

Anime Title Matcher (ATM)

Build Status

The purpose of this tool is to find the best matching Anime for a given string.

The result is always exactly one Anime with some metadata in JSON-format. Anime Indexer recognizes multiple languages as far as Anime titles go.

The data source is Manami-Project's anime-offline-database, which gets downloaded into the execution directory if it does not exist.

Successful output is always in JSON. The only exceptions are error messages and the help text.

Matching is done in steps:

  1. Search for exact title (case-insensitive)
  2. Search for exact alternative title (=synonym, also case-insensitive)
  3. Search for partial title (case-insensitive)
  4. Match by highest score of titles and synonyms combined using the Jaro-Winkler Distance.

Example

$ java -jar atm.jar 未来日記
{
  "type": "OVA",
  "title": "Mirai Nikki",
  "picture": "https://img7.anidb.net/pics/anime/60575.jpg",
  "thumbnail": "https://img7.anidb.net/pics/anime/thumbs/50x65/60575.jpg-thumb.jpg",
  "episodes": 1,
  "sources": [
    "https://anidb.net/a7432",
    "https://anilist.co/anime/8460",
    "https://animenewsnetwork.com/encyclopedia/anime.php?id\u003d11373",
    "https://kitsu.io/anime/5344"
  ],
  "relations": [
    "https://anidb.net/a8395",
    "https://anilist.co/anime/10620",
    "https://animenewsnetwork.com/encyclopedia/anime.php?id\u003d12896",
    "https://kitsu.io/anime/6266"
  ],
  "synonyms": [
    "Future Diary",
    "Gelecek Günlüğü",
    "Mirai Nikki OVA",
    "The Future Diary OVA",
    "未来日記"
  ]
}

Requirements

ATM requires a local Java Runtime installation with version 1.8 or higher. An active internet connection is required for the first execution to download the Anime database file.

Usage

Installation

Download the latest atm.jar from the Releases Page.

$ java -jar atm.jar [OPTIONS] <arg>

For convenience you can create an alias in your .bashrc or profile:

$ alias atm="java -jar /path/of/jar/atm.jar"

Example Usages

# regular usage
$ java -jar atm.jar Grisaia
$ java -jar atm.jar -f myfile.txt

# read from stdin
$ cat myfile.txt | java -jar atm.jar -

Options

Flag Description
- Empty flag. Read from stdin.
-d, --duplicates Lists only duplicates when used in batch mode (-f or - flags).
-f, --file FILE Parses a file containing Anime titles separated by newline.
-h, --help Prints the help text.

Troubleshooting

Problem Fix
Some Anime are not matched correctly. Refresh the database by deleting the anime-offline-database.json file in your ~/.atm directory. This helps if the Anime is very recent and the database file is too old. If that does not fix it, please open an Issue on Github with the exact title you tried to match and what the result was.

Build

Required tools:

  • Maven 3.3.9
  • JDK 1.8+

Clone the git repository and run maven in the root directory.

$ mvn clean install

This creates the atm.jar file in the target directory. This is the main executable as shown in the examples. All dependencies are contained in the jar-file.

License

Copyright 2018 go-ive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

atm's People

Contributors

asdf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.