osureplay

osu! replay parser

Readme

osureplay, a parser for osu replays in Nim Build Status

This is a parser for osu! rhythm game replay files as described by https://osu.ppy.sh/wiki/Osr_(file_format).

Originally this parser was ported from this Python replay parser

Installation

To install osureplay, simply run:

$ nimble install osureplay

Documentation

To parse a replay from a filepath:

import osureplay

let replay = parseReplayFile("replay.osr")

To parse a replay from a string which contains replay data:

import osureplay

let replay = parseReplay(data)

Replay objects provide these fields

replay.gameMode # GameMode enum
replay.gameVersion # Integer
replay.beatmapHash # String
replay.playerName # String
replay.replayHash # String
replay.number300s # Integer
replay.number100s # Integer
replay.number50s # Integer
replay.gekis # Integer
replay.katus # Integer
replay.misses # Integer
replay.score # Integer
replay.maxCombo # Integer
replay.isPerfectCombo # Boolean
replay.mods # set of Mods
replay.lifeBarGraph # String, unparsed as of now
replay.timestamp # TimeInfo object
replay.playEvents # Sequence of ReplayEvent tuples

ReplayEvent tuples provide these fields

event.timeSincePreviousAction # Integer representing time in milliseconds
event.x # X axis location
event.y # Y axis location
event.keysPressed # Bitwise sum of keys pressed, documented in OSR format page.
event.timestamp # Absolute timestamp (from replay start)
Need help? Read Nimble
Author:
Yardanico
No tagged versions available
License: MIT

Project website Hosted docs