-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osrparse 6.0.0 #30
osrparse 6.0.0 #30
Conversation
hmm, everything seems good, but it still lacks a life bar parser i can try to create both of these, if that's good |
A life bar parser would be great if you want to make a pr for that (branch off this pr to avoid conflicts). I'd prefer to create the readthedocs myself since I'd like to choose the theme, write a few pages, etc. but I agree that with those two things osrparse will be 100% complete (until lazer switches to their own replay format :P) |
alright then, i will make a parser and a dumper for the life bar |
here's the pull request with everything about life bars! |
I'd prefer not to add such a simple dependency (one that we can reproduce in 30 lines of code). Dependencies can make breaking changes, or require being updated, or disappear from the internet. |
alright, i understand |
I'm no lawyer, but if we're being super technical and legal then including a copy of its license in osrparse probably is required. That said, nobody really cares and a full copy of the license is way overkill, so linking back to the original library in the copied function (as you've already done) is fine. |
alright then, i guess we are fine! |
a packer and an unpacker for a life bar graph
is there anything that needs to be done, except documentation? |
nope, documentation is the last thing. @kszlim I pinged you on discord, but in the hopes you'll respond here sooner, could I get the "maintainer" role on this repo? I'd like to set up readthedocs on github pages (per above), but need access to the repository settings to do so. Should be under settings -> manage access |
documentation done and looks good on the site https://kevin-lim.ca/osu-replay-parser/index.html, merging |
alright, everything seems nice! i am glad that i could contribute for it a bit |
yep - thanks for your help! |
This is essentially a rewrite of osrparse and brings consistency in forward facing methods and naming.
Changes
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 objectReplay.from_string
- from a string holding the contents of a replay"dumping" has been renamed to "write" and is done through a matching set of methods:
Replay.write_path
- write the replay back to a pathReplay.write_file
- write the replay back to a live file objectReplay.pack
- return the contents of the replay as a string, suitable for writing to an osr file(note that this isn't a breaking change since no actual release has included dumping yet).
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 parametersdecoded
anddecompressed
, as well as a newmode
parameter. It now returnsList[ReplayEvent]
instead of the nonsensicalReplay
with onlyplay_data
filled, as before.Also added
replay.rng_seed
, which will be set for replays which have the rng seed.Renamings:
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