Skip to content

v6.0.0

Compare
Choose a tag to compare
@tybug tybug released this 12 Jan 19:13
· 35 commits to master since this release
64e1c93

Parsing replays is now done through static methods on Replay:

  • Replay.from_path - parse from a path (most common)
  • Replay.from_file - parse from a live file object
  • Replay.from_string - from a string holding the contents of a replay

The concept of "pure lzma" and parsing only the replay data portion of a replay has been replaced with parse_replay_data, which takes optional parameters decoded and decompressed, as well as a new mode parameter. It now returns List[ReplayEvent] instead of a Replay with only play_data filled, as before.

Replay writing has been added, and is done through a matching set of methods:

  • Replay.write_path - write the replay back to a path
  • Replay.write_file - write the replay back to a live file object
  • Replay.pack - return the contents of the replay as a string, suitable for writing to an osr file

Also added replay.rng_seed, which will be set for replays which have the rng seed.

Several attributes have been renamed to bring osrparse closer to osu!'s internal naming of attributes:

  • number_{300, 100, 50}s -> count_{300, 100, 50}
  • {geki, katu, misses} -> {count_geki, count_katu, count_miss}
  • is_perfect_combo -> perfect
  • game_mode -> mode
  • player_name -> username
  • play_data -> replay_data
  • mod_combination -> mods

Finally, this release brings a readthedocs: https://kevin-lim.ca/osu-replay-parser/.