ebshimizu / hots-parser

A node-based Heroes of the Storm match parser
MIT License
12 stars 3 forks source link

Is there a command line interface? #45

Closed narfdotpl closed 5 years ago

narfdotpl commented 5 years ago

Hi, thanks for this repo! I found it when trying to get the game mode out of a replay, it's a great resource. Is there an option to use your code from the command line or only from node? I use Python and being able to call your parser on the command line and get JSON on stdout would be awesome.

What I want to do is process all my replays and get the following data from them: game mode, match duration, and client version.

ebshimizu commented 5 years ago

There's no cli interface for it, sorry! Your best bet with that workflow is to create a short node script that passes the command line args to the parser, outputs in the format that you like, and gets called from python's system call function with a node ./my_script.js [args] type command.

Regarding the info, while most of that is in the getHeader function, I think the match length is only available on full parse.

narfdotpl commented 5 years ago

OK, thanks. I implemented match duration calculation using GatesOpen and core UnitDied events based on your code. 🙇

narfdotpl commented 5 years ago

I've finally finished analyzing my replays 😅 http://narf.pl/posts/hots-duration