screp

module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2020 License: Apache-2.0

README

screp

Build Status GoDoc Go Report Card

StarCraft: Brood War replay parser.

Initially this parser was developed as part of the repMastered project (the initial history can be found there), but was outsourced here as a separate project.

The package is designed to be used by other packages or apps, and is safe for concurrent use. There is also an example CLI app that can be used standalone.

Parses both "modern" (starting from 1.18) and "legacy" (pre 1.18) replays.

Check out the sister project to parse StarCraft II replays: s2prot

Using the screp CLI app

There is a command line application in the cmd/screp folder which can be used to parse and display information about a single replay file.

The extracted data is displayed using JSON representation.

Usage is as simple as:

screp [FLAGS] repfile.rep

Run with -h to see a list of available flags.

Example to parse a file called sample.rep, and display replay header (included by default) and basic map data info (without tiles and resource location info):

s2prot -map=true sample.rep

Or simply:

s2prot -map sample.rep

Installing the screp CLI app

The easiest is to download the binary release prepared for your platform from the Releases page. Extract the archive and start using screp.

If you want to build screp from source, then simply run the following command:

go get -u github.com/icza/screp/...

This will clone this repo if you don't have it yet, or update it if you already have it in your $GOPATH, and will build and place screp inside $GOPATH/bin.

Example projects using this

Directories

Path Synopsis
cmd
screp
Package main is a simple CLI app to parse and display information about a StarCraft: Brood War replay passed as a CLI argument.
Package main is a simple CLI app to parse and display information about a StarCraft: Brood War replay passed as a CLI argument.
rep
Package rep models StarCraft: Brood War replays.
Package rep models StarCraft: Brood War replays.
repcmd
Package repcmd models player commands.
Package repcmd models player commands.
repcore
Package repcore contains core types and utilities used for modeling StarCraft: Brood War replays.
Package repcore contains core types and utilities used for modeling StarCraft: Brood War replays.
Package repparser implements StarCraft: Brood War replay parsing.
Package repparser implements StarCraft: Brood War replay parsing.
repdecoder
Package repdecoder implements decoding StarCraft Brood War replay files (*.rep).
Package repdecoder implements decoding StarCraft Brood War replay files (*.rep).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL