ppy / osu-tools

command line tools to get stuff done
MIT License
105 stars 78 forks source link

Rewrite PP commands as API commands to improve UX #180

Closed smoogipoo closed 1 year ago

smoogipoo commented 1 year ago

Currently, using the performance command is pretty weird...:

  1. It requires specifying a beatmap (whether as a beatmap ID or a file).
  2. It requires listing each replay as an optional CLI argument (-r <replay_file_1> [-r <replay_file_2> ...]).

I personally use this command quite a bit when cross-checking the results of my SR/PP spreadsheets, and it's always a pain to download the replay, pass that replay as an argument (especially with tools like Rider where autocomplete is shoddy), and also to remember the format/list the beatmap ID - even though I have it available it's too much to keep in mind.

Here's an example to remind how the generated spreadsheet looks: https://docs.google.com/spreadsheets/d/1cdGLM0dG4TMmtuVPFrYg53-CzUqwWVhZlPw6dkp7VpQ/edit#gid=1429694019

Two new commands replace the existing performance one:

Both of these are API commands which means they need additional API secrets appended as CLI arguments, and take the job of querying for the beatmap ID away from the user. The first command in particular is going to be very heavily used by me with spreadsheets like the one above.

Additionally, I've cleaned up the output by re-using the output of SimulateCommand. That command's output has gone through several revisions already, and also had a flag to provide JSON output (now indented) that could be useful here (e.g. for piping into jq).