banner



How To Upload Replays To Hotslogs

A control line uploader for HOTS Logs

Is this what the Nexus looks like? Source: HotS website

Recently, somehow, I've been playing a flake of Heroes of the Storm, a MOBA past Blizzard. And because I similar looking at statistics, I've too been using this website called HOTS Logs by Ben Barrett, "software engineer by day, and gorging gamer past night", which analyses and aggregates statistics from player-uploaded replays, such every bit the popularity and win rate of various heroes across all games, by map or even private players.

HotS logo from the same page, but they were separate graphics composed in HTML.

I'm not familiar with the MOBA scene, just it seems like statistics sites for other MOBAs such as DOTA or LOL take the means to game data directly through official APIs or from scraping the game customer. Meanwhile, there'southward currently no way to do so in Heroes, so the primary source of information comes from players actively uploading their replays. There's definitely an element of selection bias hither, but hopefully with a significant enough number of replays, the aggregated statistics should exist reliable enough.

I decided to do my part past uploading my own replays likewise, which could be washed through the browser on the HOTS Logs website, or using an uploader application. There were two choices for the latter, 1 written past the HOTS Logs creator himself and ane contributed by a HOTS Logs user, /u/RushTea, which was also open up-sourced on GitHub: eivindveg/HotSUploader.

I didn't use any of the uploader applications myself, instead simply uploading through the browser, but after a while it got tedious to manually check the time of the last replay in my lucifer history, then select all the subsequent replays from my computer and elevate them into the browser. If someone else uploaded a replay of a game I played before I did, it would appear at the summit of my friction match history and sometimes cause me to skip uploading games before that.

On a whim, I decided to write my own command-line tool for uploading replays to overcome this inconvenience (equally well as a multitude of other irrational reasons including not invented here syndrome and because CLIs are sometimes cooler than GUIs).

Information technology turned out to be harder than I expected after I found out HOTS Logs didn't take a documented API for uploading replays and I couldn't simply make a multipart/form-data Mail request to mimic uploading through the browser, just thanks to /u/RushTea'due south uploader being open up source I could see how he did it and figure information technology out.

My uploader is merely a static binary compiled from a Go plan which tracks the last time replays were uploaded in a config file and uploads all replays newer than that time when run:

          PS C:\Users\jiayu> hotslogs upwardly
Using config file: C:\Users\jiayu\.hotslogs.yaml
Looking for new replays since: 2017-08-01 20:58:15 +0800 SGT
Plant 4 new replay(s) since last upload.
Uploading new replays...
Blackheart'south Bay (16).StormReplay: DONE (Indistinguishable)
Haunted Mines (20).StormReplay: Washed (Success)
Infernal Shrines (26).StormReplay: DONE (Success)
Towers of Doom (21).StormReplay: Washed (Success)
Updating config file... Done.
PS C:\Users\jiayu>

It has no additional features such as showing details from the replay or information from HOTS Logs for now. I'1000 hoping to at least be able to implement generating the replay ID used by HOTS Logs so that duplicates tin can be detected without uploading the replay, but that involves parsing the replay files. While there are utilities and libraries available for doing this such equally Blizzard/heroprotocol (Python), barrett777/Heroes.ReplayParser (C#) and eivindveg/HotSReplayParser (Coffee), there doesn't seem to be a pure Get solution at the moment, so I was thinking of os/execing the Python i or writing my ain.

Yous can observe my uploader on GitHub if you're interested: yi-jiayu/hotslogs. Thank you for reading, and see you in the Nexus (perchance)!

How To Upload Replays To Hotslogs,

Source: https://medium.com/@jiayu./a-command-line-uploader-for-hots-logs-615ba8f676f1

Posted by: hintoncaboys53.blogspot.com

0 Response to "How To Upload Replays To Hotslogs"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel