Coder Social home page Coder Social logo

showdown-parser's Introduction

showdown-parser

A Node.js parser for raw Pokemon Showdown logs. Inspiration from Antar's official Showdown log parser.

Requirements

  • Node 7.4.0+

Setup

  • npm install

Usage

  • node index -f <format> -d <date> -c <cutoff> -o <type> [--no-logs]

format should be formatted as gen7vgc2017, date as 2017-10, cutoff as 1760 and type as usage|json. The --no-logs flag will keep the parser from re-parsing the logs data, but rather just build a formatted .txt or .json from the compiled data existing in the appropriate directory.

The path to your Logs directory resides in appConfig.js so you will need to configure your environment appropriately.

In appConfig.js you will also find a field threads. This must be modified to provide how many CPU-threads you would like to utilize for log parsing. This number will need to be tuned based on your hardware performance, as well as the data-size. Data sets may grow too large to parse all information in a low thread count without hitting an OOM error. In this case, bump up your parallel thread count so that Node will use a greater # of standalone processes to handle the large memory requirements.

Running the app will provide you with a progress bar, displaying your completion and your logs being parsed per second. Once this has completed, the logs will be dumped into their appropriate folders (raw/, compiled/, formatted/, json/).

Features

This parser will currently output moveset data in .txt format, matching the data found here.

Optionally, the parser will output .json matching the format of Smogon's chaos data found here.

Issues

Due to limitations of floating point arithmetic, floating point calculations behave slightly different versus Antar's original Python implementation. Therefore, the weighting calculations on cutoff data will differ from Smogon's usage stat data by 0.01-0.1% reported. This is a fairly insignificant difference, but the issue does exist.

showdown-parser's People

Contributors

griffinledingham avatar

Stargazers

Junebum Ryoo avatar Luke GJ Potter avatar Kirk Scheibelhut avatar Hugh Dylan Broome avatar

Watchers

James Cloos avatar  avatar

Forkers

gazoney

showdown-parser's Issues

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.