Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -26,17 +29,17 @@ 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 | Ready ✅ | 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)

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'
Expand All @@ -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:

Expand Down
3 changes: 2 additions & 1 deletion locales/lang_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion locales/lang_ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@
"all_time": "ВСЕ-ВРЕМЯ",
"per_game": "ЗА-ИГРУ",
"value": "ЗНАЧ",
"change_lang": "Смена языка"
"change_lang": "Смена языка",
"unsupported_version": "Неподдерживаемая версия сохранения\nДля большей информации, смотрите README.md"
}
2 changes: 0 additions & 2 deletions source/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
13 changes: 11 additions & 2 deletions source/data_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import sys
from ui_handler import texts
from __init__ import VERSION

while True:
try:
Expand Down Expand Up @@ -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(f'{texts["unsupported_version"]}: {db["version"]}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"]}')
Expand All @@ -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(f'{texts["unsupported_version"]}: {db["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"]}')
Expand Down
10 changes: 6 additions & 4 deletions source/export_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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',
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions source/statistics_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down