ppy / osu-tools

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

Add section headers to simulate output #139

Closed bdach closed 2 years ago

bdach commented 2 years ago

As proposed in https://github.com/ppy/osu-tools/issues/137#issuecomment-996091249.

Example output before ``` beatmap : 951401 - Dendei - gabe power (HighTec) [Cheesecake's Easy] score : 0 accuracy : 79.82 combo : 14 mods : None --- great : 14 ok : 2 meh : 3 miss : 0 --- pp : 0.03 aim : 0.03 speed : 0.00 accuracy : 0.00 flashlight : 0.00 od : 2.00 ar : 2.00 max combo : 83.00 --- star rating : 1.25 max combo : 83.00 aim strain : 0.70 speed strain : 0.43 slider factor : 0.77 approach rate : 2.00 overall difficulty : 2.00 ```
Example output after ``` Basic score info ────────────────────────────────────────────────────────────────────────────────────────────────────────────── beatmap : 951401 - Dendei - gabe power (HighTec) [Cheesecake's Easy] score : 0 accuracy : 79.82 combo : 14 mods : None Hit statistics ────────────────────────────────────────────────────────────────────────────────────────────────────────────── great : 14 ok : 2 meh : 3 miss : 0 Performance attributes ────────────────────────────────────────────────────────────────────────────────────────────────────────────── pp : 0.03 aim : 0.03 speed : 0.00 accuracy : 0.00 flashlight : 0.00 od : 2.00 ar : 2.00 max combo : 83.00 Difficulty attributes ────────────────────────────────────────────────────────────────────────────────────────────────────────────── star rating : 1.25 max combo : 83.00 aim strain : 0.70 speed strain : 0.43 slider factor : 0.77 approach rate : 2.00 overall difficulty : 2.00 ```

I made the headering function protected for consistency with other formatting functions / future extensibility even though it is rather useless right now and could as well be private.