New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

comsat

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comsat

Starcraft 2 replay file parsing in node.js

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

comsat

comsat is a node.js library for parsing Starcraft 2 replay files.

The library utilizes mpyq for replay extraction, with parsing all done through javascript.

Usage

simple

This code will print a listing of the player slots in this replay. You can do a lot more with comsat, however, see the source, tests and/or util.inspect for examples of the kind of data you can pull out (eventually I will have a list here of members for each of the properties on the Replay objects).

var comsat = require('comsat');
comsat.loadReplay('/path/to/replay.SC2Replay', false /* deleteFile */, function(err, rep) {
    if(err) throw err;

    for(var i = 0; i < rep.players.length; i++) {
        if(rep.players[i]) {
            console.log(rep.players[i].name, ' - ', rep.players[i].race.value);
        }
        else {
            console.log('Open');
        }
    }
});

Installation

comsat uses mpyq for extracting and decompressing replays and map files, so you'll need both python and mpyq.

You may also need to install some additional dependencies for node-bigint. See the install guide for more details.

To install comsat itself, use npm:

npm install comsat

Testing

To run the tests, simply run:

npm test

FAQs

Package last updated on 06 Nov 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc