From 07f2e8fe82a3ee652d7437a56d84e1bd4e59ef0d Mon Sep 17 00:00:00 2001 From: Vladislav Makarychev <99085361+worthyworm@users.noreply.github.com> Date: Sat, 28 Feb 2026 14:32:15 +0300 Subject: [PATCH 1/5] Lil fixes --- source/__init__.py | 2 -- source/export_handler.py | 10 ++++++---- source/statistics_handler.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/__init__.py b/source/__init__.py index 15b8b11..8571e94 100644 --- a/source/__init__.py +++ b/source/__init__.py @@ -11,6 +11,4 @@ INFO = f""" {LOGO} v{VERSION} - meeko 2026 -Warning: Due to some changes, savefiles are not compatible with previous versions. -Soon there will be a new version that is fully backwards-compatible. """ diff --git a/source/export_handler.py b/source/export_handler.py index 88413e2..f6aab21 100644 --- a/source/export_handler.py +++ b/source/export_handler.py @@ -43,9 +43,9 @@ def export_to_csv(sport, filename=f'export_{now.strftime("%d%m%Y_%H%M%S")}.csv') 'BLK': 'blocks', 'STL': 'steals', 'PF': 'personal_fouls', - 'Missed Free Throws': 'missedFT', + 'Missed Free Throws': 'missed_free_throws', 'Turnovers': 'turnovers', - 'Result': 'Won' + 'Result': 'result' } with open(filename, 'w', newline='', encoding='utf-8') as csvf: @@ -73,7 +73,7 @@ def export_to_csv(sport, filename=f'export_{now.strftime("%d%m%Y_%H%M%S")}.csv') print(f'{texts["no_games"]}') return - headers = ['Date', 'POS', 'MIN', 'GOALS', 'AST', 'SHOTS', 'Yellow cards', 'Red cards', 'Fouls', 'Result'] + headers = ['Date', 'POS', 'MIN', 'GOALS', 'AST', 'SHOTS', 'SAVES', 'STEALS', 'Yellow cards', 'Red cards', 'Fouls', 'Result'] key_mapping = { 'Date': 'date', @@ -82,10 +82,12 @@ def export_to_csv(sport, filename=f'export_{now.strftime("%d%m%Y_%H%M%S")}.csv') 'GOALS': 'goals', 'AST': 'assists', 'SHOTS': 'shots', + 'SAVES': 'saves', + 'STEALS': 'steals', 'Yellow cards': 'yellow_cards', 'Red cards': 'red_cards', 'Fouls': 'fouls', - 'Result': 'Won' + 'Result': 'result' } with open(filename, 'w', newline='', encoding='utf-8') as csvf: diff --git a/source/statistics_handler.py b/source/statistics_handler.py index 64630fe..c72d7c0 100644 --- a/source/statistics_handler.py +++ b/source/statistics_handler.py @@ -84,7 +84,7 @@ def show_stats(match_index): ["Assists", str(games[match_index]["assists"])], ["Rebounds", str(games[match_index]["rebounds"])], ["Blocks", str(games[match_index]["blocks"])], ["Steals", str(games[match_index]["steals"])], ["Personal fouls", str(games[match_index]["personal_fouls"])], ["Missed Free Throws", str(games[match_index]["missed_free_throws"])], - ["Turnovers", str(games[match_index]["turnovers"])], ["Won", str(games[match_index]["result"])] + ["Turnovers", str(games[match_index]["turnovers"])], ["Result", str(games[match_index]["result"])] ] print(f"{f'{texts["stat"]}':<20} {f'{texts["value"]}'}") print("─" * 35) @@ -97,7 +97,7 @@ def show_stats(match_index): ["Assists", str(games[match_index]["assists"])], ["Shots", str(games[match_index]["shots"])], ["Saves", str(games[match_index]["saves"])], ["Steals", str(games[match_index]["steals"])], ["Yellow Cards", str(games[match_index]["yellow_cards"])], ["Red Cards", str(games[match_index]["red_cards"])], - ["Won", str(games[match_index]["result"])] + ["Result", str(games[match_index]["result"])] ] print(f"{f'{texts["stat"]}':<20} {f'{texts["value"]}'}") print("─" * 35) From 3579162e93b9aae450995e5d625ba41be879425a Mon Sep 17 00:00:00 2001 From: Vladislav Makarychev <99085361+worthyworm@users.noreply.github.com> Date: Sat, 28 Feb 2026 14:52:52 +0300 Subject: [PATCH 2/5] Update data_handler.py --- source/data_handler.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/data_handler.py b/source/data_handler.py index ef300d4..dbaa09f 100644 --- a/source/data_handler.py +++ b/source/data_handler.py @@ -2,6 +2,7 @@ import json import sys from ui_handler import texts +from __init__ import VERSION while True: try: @@ -31,9 +32,13 @@ try: with open('basketball.json', 'r', encoding='utf-8') as f: db = json.load(f) + if tuple(map(int, db['version'].split('.'))) < (1, 1, 2): + print('Unsupported version') + input('Enter to continue') + sys.exit(1) except FileNotFoundError: player = input(f"{texts["enter_name"]}: ") - db = {"player": player, "games": []} + db = {"version": VERSION, "player": player, "games": []} except json.decoder.JSONDecodeError as e: print(f"The file is not a valid Json file or is empty\nERROR: {e}") input(f'{texts["enter_to_continue"]}') @@ -47,9 +52,13 @@ try: with open('soccer.json', 'r', encoding='utf-8') as f: db = json.load(f) + if tuple(map(int, db['version'].split('.'))) < (1, 1, 2): + print('Unsupported version') + input('Enter to continue') + sys.exit(1) except FileNotFoundError: player = input(f'{texts["enter_name"]}: ') - db = {"player": player, "games": []} + db = {"version": VERSION, "player": player, "games": []} except Exception as e: print(f'ERROR: {e}') input(f'{texts["enter_to_continue"]}') From c95cd1bf16e8c488a55a9cf56e0a3bc102a4556a Mon Sep 17 00:00:00 2001 From: Vladislav Makarychev <99085361+worthyworm@users.noreply.github.com> Date: Sat, 28 Feb 2026 14:54:09 +0300 Subject: [PATCH 3/5] Update README.md --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b593354..30b17dd 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ # Showoff - A simple sports stats tracker -![Version](https://img.shields.io/badge/version-1.1.1-blue) +![Version](https://img.shields.io/badge/version-1.1.2-blue) ![Python](https://img.shields.io/badge/python-3.9+-green) ![License](https://img.shields.io/badge/license-MIT-orange) ![made with love](https://img.shields.io/badge/made%20with-%3C3-red) +> **Versions below v1.1.2 are not-supported** + Showoff is a simple sports self-statistics tracker for players or their coaches, written to be easy to use and to be informational. Currently supports basketball, soccer. +You can also offer your sport, or help with existing ones ## Requirements @@ -26,9 +29,9 @@ You can run showoff using [binaries for your system](https://github.com/worthywo | Platform | Status | Latest | |----------|-----------------------------|--------------------| -| Windows | Partial-support(Has issues) | v1.1.1 | -| Linux | Ready ✅ | v1.1.1 | -| macOS | Could be later ⚠️ | No builds uploaded | +| Windows | Partial-support(Has issues) | v1.1.2 | +| Linux | Ready ✅ | v1.1.2 | +| macOS | Ready ✅ | v1.1.2 | 1. Download the latest binary files for your system: - [Latest Release](https://github.com/worthyworm/showoff/releases/latest) @@ -50,7 +53,6 @@ You can run showoff using [binaries for your system](https://github.com/worthywo ### Using the source code -> Note: Using the source code is NOT recommended. The code is being worked on and some features may be unfinished 1. Clone the repository: From 67de68a3bec9b231171ae85b65f01a27ca321bea Mon Sep 17 00:00:00 2001 From: worthyworm <99085361+worthyworm@users.noreply.github.com> Date: Sun, 1 Mar 2026 01:10:18 +0300 Subject: [PATCH 4/5] Update data_handler.py, locales --- README.md | 2 +- locales/lang_en.json | 3 ++- locales/lang_ru.json | 3 ++- source/data_handler.py | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 30b17dd..a1750ed 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ You can run showoff using [binaries for your system](https://github.com/worthywo 2. Unpack the binary in a convenient folder. 3. Launch: - > Note for windows users: + > Note for Windows users: > > Windows defender may detect showoff as a malware, so it is recommended to disable defender / add showoff to exceptions - **Windows**: Double-click 'showoff.exe' diff --git a/locales/lang_en.json b/locales/lang_en.json index a6e1469..819cba9 100644 --- a/locales/lang_en.json +++ b/locales/lang_en.json @@ -50,5 +50,6 @@ "all_time": "ALL-TIME", "per_game": "PER-GAME", "value": "VALUE", - "change_lang": "Change language" + "change_lang": "Change language", + "unsupported_version": "Unsupported save version\nFor more information, see the readme" } \ No newline at end of file diff --git a/locales/lang_ru.json b/locales/lang_ru.json index a506828..5a27ea5 100644 --- a/locales/lang_ru.json +++ b/locales/lang_ru.json @@ -50,5 +50,6 @@ "all_time": "ВСЕ-ВРЕМЯ", "per_game": "ЗА-ИГРУ", "value": "ЗНАЧ", - "change_lang": "Смена языка" + "change_lang": "Смена языка", + "unsupported_version": "Неподдерживаемая версия сохранения\nДля большей информации, смотрите README.md" } \ No newline at end of file diff --git a/source/data_handler.py b/source/data_handler.py index dbaa09f..c422b90 100644 --- a/source/data_handler.py +++ b/source/data_handler.py @@ -33,7 +33,7 @@ with open('basketball.json', 'r', encoding='utf-8') as f: db = json.load(f) if tuple(map(int, db['version'].split('.'))) < (1, 1, 2): - print('Unsupported version') + print(f'{texts["unsupported_version"]}: {db["version"]}version') input('Enter to continue') sys.exit(1) except FileNotFoundError: @@ -53,7 +53,7 @@ with open('soccer.json', 'r', encoding='utf-8') as f: db = json.load(f) if tuple(map(int, db['version'].split('.'))) < (1, 1, 2): - print('Unsupported version') + print(f'{texts["unsupported_version"]}: {db["version"]}') input('Enter to continue') sys.exit(1) except FileNotFoundError: From ed24a5d576b6f24a8fa9a4cd590130d7cc9c3bd6 Mon Sep 17 00:00:00 2001 From: Vladislav Makarychev <99085361+worthyworm@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:19:44 +0300 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a1750ed..47e1969 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ You can run showoff using [binaries for your system](https://github.com/worthywo | Platform | Status | Latest | |----------|-----------------------------|--------------------| -| Windows | Partial-support(Has issues) | v1.1.2 | +| Windows | Ready ✅ | v1.1.2 | | Linux | Ready ✅ | v1.1.2 | | macOS | Ready ✅ | v1.1.2 |