diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-18 16:14:58 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-18 16:14:58 +0100 |
| commit | 3a867e3b0c966f84d607fc0ceafb2fdee893ed5d (patch) | |
| tree | 51a0f7d31ccc46a6e2604d33cc6cc6c63f44a335 /egometrics.py | |
| parent | c5f9c19fb0591a1d14777ad205e01e29101715ae (diff) | |
| download | EgoMetrics-3a867e3b0c966f84d607fc0ceafb2fdee893ed5d.tar.gz EgoMetrics-3a867e3b0c966f84d607fc0ceafb2fdee893ed5d.zip | |
Reorganize main menu with grouped sections and quit on 0
Diffstat (limited to 'egometrics.py')
| -rw-r--r-- | egometrics.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/egometrics.py b/egometrics.py index 5a8a556..87bd0b8 100644 --- a/egometrics.py +++ b/egometrics.py @@ -17,14 +17,21 @@ def main_menu(conn: sqlite3.Connection) -> None: while True: ui.clear_screen() print("=== EgoMetrics ===\n") - print("1. Log Workout") - print("2. View Workout Sessions") - print("3. Manage Workout Exercises") - print("4. Manage Workout Templates") + print("0. Quit\n") + + print("=== Workout ===\n") + print("1. Log Session") + print("2. View Sessions Logs") + print("3. Manage Exercises") + print("4. Manage Session Templates\n") + + print("=== Weight ===\n") print("5. Log Weight") print("6. View Weight Logs") - print("7. Quit") + choice = input("\n> ").strip() + if choice == "0": + break if choice == "1": log_workout(conn) elif choice == "2": @@ -37,8 +44,6 @@ def main_menu(conn: sqlite3.Connection) -> None: log_weight(conn) elif choice == "6": view_weight_logs(conn) - elif choice == "7": - break def main() -> None: |
