You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Giuseppe Guerra 65959b3262 Update readme with new help 3 months ago
osr v2 (resample, export normal & headerless, v2 cli) 3 months ago
.gitignore Add Makefile and .gitignore 3 months ago
LICENSE Add license and readme 4 years ago
Makefile Fix Phony targets 3 months ago
README.md Update readme with new help 3 months ago
go.mod v2 (resample, export normal & headerless, v2 cli) 3 months ago
go.sum v2 (resample, export normal & headerless, v2 cli) 3 months ago
main.go v2 (resample, export normal & headerless, v2 cli) 3 months ago

README.md

osrtool

A thing I did in an evening to quickly extract information from a osr file straight from your command line. Also a library to analyse osr files in Go. It can also be used to resample replays (to make them smaller) or to export a replay to headerless format, which cannot be read by osu! but it's used by the ripple stack.

Usage

λ osrtool --help
NAME:
   osrtool - Discover info about osr files without opening them in osu!

USAGE:
   osrtool [global options] command [command options] [arguments...]

VERSION:
   2.0.0

COMMANDS:
   info     get metadata information about a replay file
   export   re-exports a replay (to headerless, or after resampling it, or both).
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)
λ osrtool help info
NAME:
   osrtool info - get metadata information about a replay file

USAGE:
   osrtool info [command options] [osrfile]...

OPTIONS:
   --lifebar, -l       Indicate whether to output LifeBar verbosely. (default: false)
   --movements, -m     Indicate whether to output the movements. (default: false)
   --headerless, --hl  Indicate whether the passed files are headerless. (default: false)
λ osrtool help export
NAME:
   osrtool export - re-exports a replay (to headerless, or after resampling it, or both).

USAGE:
   osrtool export [command options] <from> <to>

OPTIONS:
   --resample value, -r value  Resamples the replay every r ms, instead of re-exporting the exact same replay. Use 16 for 60fps. (default: 0)
   --headerless, --hl          The provided replay will be exported as headerless. (default: false)

Example

λ osrtool info osu\!\ -\ Drop\ -\ Granat\ \[Easy\]\ \(2016-03-21\)\ Osu.osr 
======= File: osu! - Drop - Granat [Easy] (2016-03-21) Osu.osr
	osu! version: 20151228
	Beatmap hash: 759d524d014f78ef46cc12757b24f652
	Replay hash:  718a621410752d6706d5a92b332b3051
	Player:       osu!
	Game mode:    ModeStandard
	Score:        74186
	MaxCombo:     127
	FullCombo'd?  1
	Mods:         2048
	Time:         2016-07-12 00:17:00 +0200 CEST
	
	   39x300          15xGeki
	    0x100           0xKatu
	    0x50            0xMiss
λ osrtool info -l osu\!\ -\ Drop\ -\ Granat\ \[Easy\]\ \(2016-03-21\)\ Osu.osr 
======= File: osu! - Drop - Granat [Easy] (2016-03-21) Osu.osr
	osu! version: 20151228
	Beatmap hash: 759d524d014f78ef46cc12757b24f652
	Replay hash:  718a621410752d6706d5a92b332b3051
	Player:       osu!
	Game mode:    ModeStandard
	Score:        74186
	MaxCombo:     127
	FullCombo'd?  1
	Mods:         2048
	Time:         2016-07-12 00:17:00 +0200 CEST
	
	   39x300          15xGeki
	    0x100           0xKatu
	    0x50            0xMiss

	Lifebar:
		944: 100.00%
		3264: 100.00%
		5917: 100.00%
		10227: 100.00%
		12880: 100.00%
		16195: 100.00%
		18848: 100.00%
		21832: 100.00%
		24816: 100.00%
		27800: 100.00%
		30784: 100.00%
		33768: 100.00%
		36753: 100.00%
		39737: 100.00%
		42057: 100.00%

λ  osrtool info -m osu\!\ -\ Drop\ -\ Granat\ \[Easy\]\ \(2016-03-21\)\ Osu.osr | less
======= File: osu! - Drop - Granat [Easy] (2016-03-21) Osu.osr
        osu! version: 20151228
        Beatmap hash: 759d524d014f78ef46cc12757b24f652
        Replay hash:  718a621410752d6706d5a92b332b3051
        Player:       osu!
        Game mode:    ModeStandard
        Score:        74186
        MaxCombo:     127
        FullCombo'd?  1
        Mods:         2048
        Time:         2016-07-12 00:17:00 +0200 CEST
        
           39x300          15xGeki
            0x100           0xKatu
            0x50            0xMiss


        Movements:
                -100000 - X:  256.00; Y:  500.00; Key:  None
                 98781 - X:  256.00; Y:  500.00; Key:  None
                   500 - X:  256.00; Y:  192.00; Key:  None
                    17 - X:  256.00; Y:  196.23; Key:  None
                    17 - X:  256.00; Y:  200.39; Key:  None
                    17 - X:  256.00; Y:  204.48; Key:  None
                    16 - X:  256.00; Y:  208.50; Key:  None
                    17 - X:  256.00; Y:  212.44; Key:  None
                    17 - X:  256.00; Y:  216.32; Key:  None
                    16 - X:  256.00; Y:  220.12; Key:  None
                    17 - X:  256.00; Y:  223.86; Key:  None
                    17 - X:  256.00; Y:  227.52; Key:  None
                    16 - X:  256.00; Y:  231.11; Key:  None
                    17 - X:  256.00; Y:  234.63; Key:  None
                    17 - X:  256.00; Y:  238.08; Key:  None
                    16 - X:  256.00; Y:  241.46; Key:  None
					...................