Skip to content

motzel/go-bsor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BS Open Replay Go parser

Beat Saber Open Replay format parser written in Go

Disclaimer: This is my Go learning project, so expect bugs and ugly code

Install

go get -u github.com/motzel/go-bsor

Usage

path := "replays/hellfire.bsor"

file, err := os.Open(path)
if err != nil {
    log.Fatal("Can not open file: ", err)
}

defer file.Close()

var replay *bsor.Bsor
if replay, err = bsor.Read(file); err != nil {
    log.Fatal("Replay decode: ", err)
}

fmt.Printf("BSOR version: %v\n", replay.Header.Version)
fmt.Printf("BSOR Info: %+v\n", replay.Info)
fmt.Printf("BSOR Frames: %v\n", len(replay.Frames))
fmt.Printf("BSOR Notes: %v\n", len(replay.Notes))
fmt.Printf("BSOR Walls: %v\n", len(replay.Walls))
fmt.Printf("BSOR Heights: %v\n", len(replay.Heights))
fmt.Printf("BSOR Pauses: %v\n", len(replay.Pauses))

About

BS Open Replay Go parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages