ppy / osu-tools

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

Add `leaderboard` command #136

Closed stanriders closed 2 years ago

stanriders commented 2 years ago

Example output:

> dotnet -- leaderboard ... ... -r 0 -l 5

Calculating mrekk top scores...
Calculating aetrna top scores...
Calculating WhiteCat top scores...
Calculating RyuK top scores...
Calculating NyanPotato top scores...
╔══╤══════════╤═══════╤════════╤═════════╗
║# │username  │live pp│local pp│pp change║
╟──┼──────────┼───────┼────────┼─────────╢
║- │mrekk     │21428.8│ 20215.5│  -1213.3║
╟──┼──────────┼───────┼────────┼─────────╢
║- │aetrna    │19104.7│ 19039.5│    -65.2║
╟──┼──────────┼───────┼────────┼─────────╢
║+1│RyuK      │18474.7│ 17853.5│   -621.2║
╟──┼──────────┼───────┼────────┼─────────╢
║-1│WhiteCat  │18817.0│ 17287.8│  -1529.2║
╟──┼──────────┼───────┼────────┼─────────╢
║- │NyanPotato│18044.7│ 17176.0│   -868.7║
╚══╧══════════╧═══════╧════════╧═════════╝

It reuses some code from profile command which I didn't had any good idea how to separate into some kind of base class