Skip to content

Commit 8f67556

Browse files
Add new listing options
1 parent f836e11 commit 8f67556

File tree

1 file changed

+75
-30
lines changed

1 file changed

+75
-30
lines changed

main.py

Lines changed: 75 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
# PyWORKOUT CLI
22
# (C) 2021 - 2022
33

4+
# Workout Options
5+
# Start workout - get time, list first item
6+
# Item complete - show time completed, start new time, show percentage, move to next workout
7+
# Workout finished - show total time, activities completed
8+
# Stats - time, percentage complete
9+
# Video - play video for that group
10+
411
# Import Statements
512
import subprocess
613
from datetime import datetime
714
import time
815

916
# Workout Lists
1017
groups = ["Abs", "Quads", "Glutes", "Triceps", "Biceps", "Back", "Chest"]
11-
sunday = ["Situps", "Reverse Crunches", "Bicycle Crunches", "Flutter Kicks", "Leg Raises", "Elbow Planks"]
12-
sunday_count = [25, 25, 25, 25, 25, 4]
13-
monday = ["Lunges", "High Knees", "Side Kicks", "Mountain Climbers", "Plank Jump Ins", "Lunges & Step Ups"]
18+
sunday = ["Situps\t", "Reverse Crunches", "Bicycle Crunches", "Flutter Kicks", "Leg Raises\t", "Elbow Planks\t"]
19+
sunday_count = [25, 25, 25, 25, 25, 2]
20+
monday = ["Lunges\t", "High Knees\t", "Side Kicks\t", "Mountain Climbers", "Plank Jump Ins", "Lunges & Step Ups"]
1421
monday_count = [50, 50, 50, 25, 25, 50]
15-
tuesday = ["Squats", "Donkey Kicks", "Bridges", "Step Ups", "Fly Steps", "Side Leg Raises"]
22+
tuesday = ["Squats\t", "Donkey Kicks\t", "Bridges\t", "Step Ups\t", "Fly Steps\t", "Side Leg Raises"]
1623
tuesday_count = [25, 25, 25, 25, 50, 50]
17-
wednesday = ["Diamond Pushups", "Tricep Dips", "Tricep Extensions", "Get Ups", "Punches", "Side to Side Chops"]
24+
wednesday = ["Diamond Pushups", "Tricep Dips\t", "Tricep Extensions", "Get Ups\t", "Punches\t", "Side to Side Chops"]
1825
wednesday_count = [25, 25, 25, 50, 50, 50]
19-
thursday = ["Backlists", "Doorframe Rows", "Decline Pushups", "Side Plank", "Pushups"]
20-
thursday_count = [50, 50, 25, 4, 25]
21-
friday = ["Scapular Shrugs", "Supermans", "Back Lifts", "Aternating Arm/Leg Plank", "Reverse Angels"]
22-
friday_count = [25, 25, 25, 4, 25]
23-
saturday = ["Pushups", "Chest Expansions", "Chest Squeezes", "Pike Pushups", "Shoulder Taps"]
24-
thursday_count = [25, 25, 25, 25, 25, 25]
26+
thursday = ["Backlists\t", "Doorframe Rows", "Decline Pushups", "Side Plank\t", "Pushups\t"]
27+
thursday_count = [50, 50, 25, 2, 25]
28+
friday = ["Scapular Shrugs", "Supermans\t", "Back Lifts\t", "Arm/Leg Plank", "Reverse Angels"]
29+
friday_count = [25, 25, 25, 2, 25]
30+
saturday = ["Pushups\t", "Chest Expansions", "Chest Squeezes", "Pike Pushups\t", "Shoulder Taps"]
31+
saturday_count = [25, 25, 25, 25, 25, 25]
2532
complete = []
2633

2734
# Videos
@@ -30,36 +37,46 @@ def openvideo():
3037

3138
# Welcome
3239
print(" WELCOME TO PyWORKOUT")
33-
print("Please select a group from those below. \n")
40+
print("Please select a group from those below.")
3441
for i in range(len(groups)):
3542
print(str(i+1) + ". " + str(groups[i]))
36-
print("A reminder that today is: " + datetime.today().strftime('%A') + ". Consider option " + str((datetime.today().strftime('%w'))+1))
43+
print("A reminder that today is: " + datetime.today().strftime('%A') + ". Consider option " + str(int(datetime.today().strftime('%w')) + 1) + ".")
3744

3845
# Display Workout Options
3946
run_options = True
4047
while run_options == True:
41-
select = str(input("Group? "))
48+
select = str(input("\nGroup? "))
4249
if select.lower() == "1" or select.lower() == "abs":
43-
print("\nAb group selected!")
50+
print("Ab muscle group selected!\n")
51+
select = "abs"
4452
run_options = False
4553
elif select.lower() == "2" or select.lower() == "quads":
46-
print("\nQuad group selected!")
54+
print("Quad muscle group selected!\n")
55+
select = "quads"
4756
run_options = False
4857
elif select.lower() == "3" or select.lower() == "glutes":
49-
print("\nGlutes group selected!")
58+
print("Glutes muscle group selected!\n")
59+
select = "glutes"
5060
run_options = False
5161
elif select.lower() == "4" or select.lower() == "triceps":
52-
print("\nTricep group selected!")
62+
print("Tricep muscle group selected!\n")
63+
select = "triceps"
5364
run_options = False
5465
elif select.lower() == "5" or select.lower() == "biceps":
55-
print("\nBicep group selected!")
66+
print("Bicep muscle group selected!\n")
67+
select = "biceps"
5668
run_options = False
5769
elif select.lower() == "6" or select.lower() == "back":
58-
print("\nBack group selected!")
70+
print("Back muscle group selected!\n")
71+
select = "back"
5972
run_options = False
6073
elif select.lower() == "7" or select.lower() == "chest":
61-
print("\nChest group selected!")
74+
print("Chest muscle group selected!\n")
75+
select = "chest"
6276
run_options = False
77+
elif select.lower() == "quit":
78+
exit()
79+
break
6380
else:
6481
print("Sorry that is incorrect. Please try again!")
6582
run_options = True
@@ -68,12 +85,40 @@ def openvideo():
6885
run_activity = True
6986
while run_activity == True:
7087
activity = str(input("What do you want to do? "))
71-
if activity.lower() == "start":
72-
start_time = time.gettime()
73-
print("Starting Workout...")
74-
elif activity.lower() == "list":
75-
print("Listing activities...")
76-
elif activity.lower() == "percent":
77-
print("Percent complete and to go")
78-
elif activity.lower() == "done":
79-
print("Workout finished")
88+
if activity.lower() == "list":
89+
if select == "abs":
90+
for i in range(len(sunday)):
91+
print(str(i+1) + ". " + str(sunday[i]) + "\t 2 Reps of " + str(sunday_count[i]))
92+
print("")
93+
elif select == "quads":
94+
for i in range(len(monday)):
95+
print(str(i+1) + ". " + str(monday[i]) + "\t 2 Reps of " + str(monday_count[i]))
96+
print("")
97+
elif select == "glutes":
98+
for i in range(len(tuesday)):
99+
print(str(i+1) + ". " + str(tuesday[i]) + "\t 2 Reps of " + str(tuesday_count[i]))
100+
print("")
101+
elif select == "triceps":
102+
for i in range(len(wednesday)):
103+
print(str(i+1) + ". " + str(wednesday[i]) + "\t 2 Reps of " + str(wednesday_count[i]))
104+
print("")
105+
elif select == "biceps":
106+
for i in range(len(thursday)):
107+
print(str(i+1) + ". " + str(thursday[i]) + "\t 2 Reps of " + str(thursday_count[i]))
108+
print("")
109+
elif select == "back":
110+
for i in range(len(friday)):
111+
print(str(i+1) + ". " + str(friday[i]) + "\t 2 Reps of " + str(friday_count[i]))
112+
print("")
113+
elif select == "chest":
114+
for i in range(len(saturday)):
115+
print(str(i+1) + ". " + str(saturday[i]) + "\t 2 Reps of " + str(saturday_count[i]))
116+
print("")
117+
run_activity = True
118+
elif activity.lower() == "quit":
119+
run_activity = False
120+
exit()
121+
break
122+
else:
123+
print("Sorry that is not an option. Please see this list of options below:")
124+
run_activity = True

0 commit comments

Comments
 (0)