You've already forked wakapi-readme-stats
Order the Projects's list by percet key, ref to issue #64
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
||||
node_modules/
|
||||
__pycache__/
|
||||
|
||||
.vscode
|
||||
|
||||
2
main.py
2
main.py
@@ -329,6 +329,8 @@ def get_waka_time_stats():
|
||||
if len(data['data']['projects']) == 0:
|
||||
project_list = no_activity
|
||||
else:
|
||||
# Re-order the project list by percentage
|
||||
data['data']['projects'] = sorted(data['data']['projects'], key=lambda x: x["percent"], reverse=True)
|
||||
project_list = make_list(data['data']['projects'])
|
||||
stats = stats + '🐱💻 ' + translate['Projects'] + ': \n' + project_list + '\n\n'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user