From 4c3514af5a1327095880f74e60b7c32bfd542f09 Mon Sep 17 00:00:00 2001 From: Alessandro Maggio Date: Mon, 17 Aug 2020 12:00:32 +0200 Subject: [PATCH 1/2] Order the Projects's list by percet key, ref to issue #64 --- .gitignore | 1 + main.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index f64f22c..ea49e9c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules/ __pycache__/ +.vscode diff --git a/main.py b/main.py index d0d18a5..c3d488c 100644 --- a/main.py +++ b/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' From 362897649a792c45daaabb6886d03a93cb2bc7a3 Mon Sep 17 00:00:00 2001 From: Alessandro Maggio Date: Mon, 17 Aug 2020 12:01:09 +0200 Subject: [PATCH 2/2] Grammar Italian fix, ref to #63 --- translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translation.json b/translation.json index ce47816..2f41c79 100644 --- a/translation.json +++ b/translation.json @@ -96,7 +96,7 @@ "Not Opted to Hire": "Non disponibile per assunzioni/colloqui", "Profile Views": "Visite al profilo", "From Hello World I have written": "Dal mio primo Hello World ho scritto ", - "I am Most Productive on": "Sono piu' produttivo il", + "I am Most Productive on": "Sono piu' produttivo di", "This Week I Spend My Time On": "Questa settimana ho speso il mio tempo su", "I Mostly Code in": "Solitamente programmo in", "Timeline": "Linea temporale",