bsor2json

command module
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 21 Imported by: 0

README

BS Open Replay to JSON

Beat Saber Open Replay format to JSON converter

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

Usage

> bsor2json.exe -h

bsor2json v0.9.1

Options:

  -h, --help   display help information

Commands:

  help     display help information
  raw      Convert raw replay data to JSON
  events   Simplify replay (notes/walls/pauses events only) and export to JSON
  stats    Calculate stats and export to JSON
Convert raw replay data to JSON
> bsor2json.exe raw -h
  
Convert raw replay data to JSON

Options:

  -h, --help                    display help information
  -d, --dir                     directory containing bsor files to convert
  -f, --file                    bsor file to convert
  -o, --output                  output filename (with -f option) or directory (with -d option); defaults to stdout or bsor directory
      --force[=false]           force overwrite
  -p, --pretty[=false]          whether the output JSON should be pretty formatted; conversion time will be much longer and the file will be larger
  -b, --buffered[=true]         whether file read should be buffered; it's faster but increases memory usage
      --parallel[=0]            parallel processing of multiple replays at once; equal to the number of cpu cores if zero or not specified 
      --display-failed[=true]   display failed replays when using the -d option

For example:

> bsor2json.exe raw -f filename.bsor -o filename.json --force
Simplify replay and export to JSON
> bsor2json.exe events -h
Simplify replay (notes/walls/pauses events only) and export to JSON

Options:

  -h, --help                    display help information
  -d, --dir                     directory containing bsor files to convert
  -f, --file                    bsor file to convert
  -o, --output                  output filename (with -f option) or directory (with -d option); defaults to stdout or bsor directory
      --force[=false]           force overwrite
  -p, --pretty[=false]          whether the output JSON should be pretty formatted; conversion time will be much longer and the file will be larger
  -b, --buffered[=true]         whether file read should be buffered; it's faster but increases memory usage
      --parallel[=0]            parallel processing of multiple replays at once; equal to the number of cpu cores if zero or not specified
      --display-failed[=true]   display failed replays when using the -d option
  -s, --with-stats[=true]       whether to add stats

For example:

> bsor2json.exe events -d Replays --with-stats
Calculate stats and export to JSON
> bsor2json.exe stats -h
Calculate stats and export to JSON

Options:

  -h, --help                    display help information
  -d, --dir                     directory containing bsor files to convert
  -f, --file                    bsor file to convert
  -o, --output                  output filename (with -f option) or directory (with -d option); defaults to stdout or bsor directory
      --force[=false]           force overwrite
  -p, --pretty[=false]          whether the output JSON should be pretty formatted; conversion time will be much longer and the file will be larger
  -b, --buffered[=true]         whether file read should be buffered; it's faster but increases memory usage
      --parallel[=0]            parallel processing of multiple replays at once; equal to the number of cpu cores if zero or not specified 
      --display-failed[=true]   display failed replays when using the -d option

For example:

> bsor2json.exe stats -f filename.bsor --pretty

Build

Dev

Install cosmtrek/air, customize the args_bin in .air.toml and then:

air.exe
Release
go build -ldflags "-s -w"
Dependencies

go-bsor (BS Open Replay parser)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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