Shorten the star/fork/watch count like [1234 to 1K] when displaying stats
hedyhli opened this issue · 0 comments
hedyhli commented
As per title, shorten the star/fork/watch count like [1234 to 1K] when displaying the stats for a repo by default. And we could add an option (maybe --long-stats
) to not do so and display the exact amount of stars. To see an example, you can look at the star counts of any within repo
To do so, (assuming there aren't any methods from standard library to do it) we can add a helper function in starcli/layouts.py, which takes in a integer, and if it's greater than 100 or almost a thousand, it will return a string which is the shortened format.
E.g.: 100 -> 100
999 -> 1K
2560 -> 2.5K
And so on, if you have a better way, you can do so too