Skip to content
osu! replay parser written in Nim language - @nim-lang
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

osureplay, a parser for osu replays in Nim Build Status

This is a parser for osu! rhythm game replay files as described by

Originally this parser was ported from this Python replay parser


To install osureplay, simply run:

$ nimble install osureplay


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)
You can’t perform that action at this time.