|
1 | | -# PyWORKOUT CLI |
2 | | -# (C) 2021 - 2022 |
3 | | - |
4 | | -# Workout Options |
5 | | -# Item complete - show time completed, start new time, show percentage, move to next workout |
6 | | -# Workout finished - show total time, activities completed |
7 | | -# Stats - time, percentage complete |
8 | | -# Video - play video for that group |
9 | | - |
10 | | -# Import Statements |
11 | | -import subprocess |
12 | | -from datetime import datetime, date |
13 | | -import time |
14 | | - |
15 | | -# Workout Lists |
16 | | -groups = ["Abs", "Quads", "Glutes", "Triceps", "Biceps", "Back", "Chest"] |
17 | | -abs = ["Situps\t", "Reverse Crunches", "Bicycle Crunches", "Flutter Kicks", "Leg Raises\t", "Elbow Planks\t"] |
18 | | -sunday_count = [25, 25, 25, 25, 25, 2] |
19 | | -monday = ["Lunges\t", "High Knees\t", "Side Kicks\t", "Mountain Climbers", "Plank Jump Ins", "Lunges & Step Ups"] |
20 | | -monday_count = [50, 50, 50, 25, 25, 50] |
21 | | -tuesday = ["Squats\t", "Donkey Kicks\t", "Bridges\t", "Step Ups\t", "Fly Steps\t", "Side Leg Raises"] |
22 | | -tuesday_count = [25, 25, 25, 25, 50, 50] |
23 | | -wednesday = ["Diamond Pushups", "Tricep Dips\t", "Tricep Extensions", "Get Ups\t", "Punches\t", "Side to Side Chops"] |
24 | | -wednesday_count = [25, 25, 25, 50, 50, 50] |
25 | | -thursday = ["Backlists\t", "Doorframe Rows", "Decline Pushups", "Side Plank\t", "Pushups\t"] |
26 | | -thursday_count = [50, 50, 25, 2, 25] |
27 | | -friday = ["Scapular Shrugs", "Supermans\t", "Back Lifts\t", "Arm/Leg Plank", "Reverse Angels"] |
28 | | -friday_count = [25, 25, 25, 2, 25] |
29 | | -saturday = ["Pushups\t", "Chest Expansions", "Chest Squeezes", "Pike Pushups\t", "Shoulder Taps"] |
30 | | -saturday_count = [25, 25, 25, 25, 25, 25] |
31 | | -complete = [] |
32 | | - |
33 | | -# Videos |
34 | | -def openvideo(): |
35 | | - sunday = subprocess.Popen(["C:\Program Files\VideoLAN\VLC\vlc.exe", "file:\\\D:\Videos\Workout Videos\10 Minute Ab Workout.mp4"]) |
36 | | - |
37 | | -# Percentage |
38 | | -def percent(group, no): |
39 | | - num = int((no/len(group))*100) |
40 | | - num = str(num) + "%" |
41 | | - return num |
42 | | - |
43 | | -# Welcome |
44 | | -print(" WELCOME TO PyWORKOUT") |
45 | | -print("Please select a group from those below.") |
46 | | -for i in range(len(groups)): |
47 | | - print(str(i+1) + ". " + str(groups[i])) |
48 | | -print("A reminder that today is: " + datetime.today().strftime('%A') + ". Consider option " + str(int(datetime.today().strftime('%w')) + 1) + ".") |
49 | | - |
50 | | -# Display Workout Options |
51 | | -run_options = True |
52 | | -while run_options == True: |
53 | | - global select |
54 | | - select = str(input("\nGroup? ")) |
55 | | - if select.lower() == "1" or select.lower() == "abs": |
56 | | - print("Ab muscle group selected!\n") |
57 | | - select = "abs" |
58 | | - run_options = False |
59 | | - elif select.lower() == "2" or select.lower() == "quads": |
60 | | - print("Quad muscle group selected!\n") |
61 | | - select = "quads" |
62 | | - run_options = False |
63 | | - elif select.lower() == "3" or select.lower() == "glutes": |
64 | | - print("Glutes muscle group selected!\n") |
65 | | - select = "glutes" |
66 | | - run_options = False |
67 | | - elif select.lower() == "4" or select.lower() == "triceps": |
68 | | - print("Tricep muscle group selected!\n") |
69 | | - select = "triceps" |
70 | | - run_options = False |
71 | | - elif select.lower() == "5" or select.lower() == "biceps": |
72 | | - print("Bicep muscle group selected!\n") |
73 | | - select = "biceps" |
74 | | - run_options = False |
75 | | - elif select.lower() == "6" or select.lower() == "back": |
76 | | - print("Back muscle group selected!\n") |
77 | | - select = "back" |
78 | | - run_options = False |
79 | | - elif select.lower() == "7" or select.lower() == "chest": |
80 | | - print("Chest muscle group selected!\n") |
81 | | - select = "chest" |
82 | | - run_options = False |
83 | | - elif select.lower() == "quit": |
84 | | - exit() |
85 | | - break |
86 | | - else: |
87 | | - print("Sorry that is incorrect. Please try again!") |
88 | | - run_options = True |
89 | | - |
90 | | -# Ask What They Want to Do |
91 | | -run_activity = True |
92 | | -while run_activity == True: |
93 | | - activity = str(input("What do you want to do? ")) |
94 | | - if activity.lower() == "list": |
95 | | - if select == "abs": |
96 | | - for i in range(len(sunday)): |
97 | | - print(str(i+1) + ". " + str(sunday[i]) + "\t 2 Sets of " + str(sunday_count[i]) + " Reps") |
98 | | - print("") |
99 | | - elif select == "quads": |
100 | | - for i in range(len(monday)): |
101 | | - print(str(i+1) + ". " + str(monday[i]) + "\t 2 Sets of " + str(monday_count[i]) + " Reps") |
102 | | - print("") |
103 | | - elif select == "glutes": |
104 | | - for i in range(len(tuesday)): |
105 | | - print(str(i+1) + ". " + str(tuesday[i]) + "\t 2 Sets of " + str(tuesday_count[i]) + " Reps") |
106 | | - print("") |
107 | | - elif select == "triceps": |
108 | | - for i in range(len(wednesday)): |
109 | | - print(str(i+1) + ". " + str(wednesday[i]) + "\t 2 Sets of " + str(wednesday_count[i]) + " Reps") |
110 | | - print("") |
111 | | - elif select == "biceps": |
112 | | - for i in range(len(thursday)): |
113 | | - print(str(i+1) + ". " + str(thursday[i]) + "\t 2 Sets of " + str(thursday_count[i]) + " Reps") |
114 | | - print("") |
115 | | - elif select == "back": |
116 | | - for i in range(len(friday)): |
117 | | - print(str(i+1) + ". " + str(friday[i]) + "\t 2 Sets of " + str(friday_count[i]) + " Reps") |
118 | | - print("") |
119 | | - elif select == "chest": |
120 | | - for i in range(len(saturday)): |
121 | | - print(str(i+1) + ". " + str(saturday[i]) + "\t 2 Sets of " + str(saturday_count[i]) + " Reps") |
122 | | - print("") |
123 | | - run_activity = True |
124 | | - elif activity.lower() == "start": |
125 | | - global activity_num |
126 | | - global start_time |
127 | | - start_time = date.today() |
128 | | - activity_num = 0 |
129 | | - print("You have started the " + select + " muscle group. ") |
130 | | - print("The current time is: " + str(time.strftime("%H:%M:%S")) + " - " + str(date.today()-start_time) + " has elapsed.") |
131 | | - print("You have completed: " + percent(select, 0)) |
132 | | - if select == "abs": |
133 | | - print("Please complete 2 Sets of " + str(sunday_count[activity_num]) + " Reps of " + str(abs[activity_num])) |
134 | | - elif select == "quads": |
135 | | - for i in range(len(monday)): |
136 | | - print(str(i+1) + ". " + str(monday[i]) + "\t 2 Sets of " + str(monday_count[i])) |
137 | | - print("") |
138 | | - elif select == "glutes": |
139 | | - for i in range(len(tuesday)): |
140 | | - print(str(i+1) + ". " + str(tuesday[i]) + "\t 2 Reps of " + str(tuesday_count[i])) |
141 | | - print("") |
142 | | - elif select == "triceps": |
143 | | - for i in range(len(wednesday)): |
144 | | - print(str(i+1) + ". " + str(wednesday[i]) + "\t 2 Reps of " + str(wednesday_count[i])) |
145 | | - print("") |
146 | | - elif select == "biceps": |
147 | | - for i in range(len(thursday)): |
148 | | - print(str(i+1) + ". " + str(thursday[i]) + "\t 2 Reps of " + str(thursday_count[i])) |
149 | | - print("") |
150 | | - elif select == "back": |
151 | | - for i in range(len(friday)): |
152 | | - print(str(i+1) + ". " + str(friday[i]) + "\t 2 Reps of " + str(friday_count[i])) |
153 | | - print("") |
154 | | - elif select == "chest": |
155 | | - for i in range(len(saturday)): |
156 | | - print(str(i+1) + ". " + str(saturday[i]) + "\t 2 Reps of " + str(saturday_count[i])) |
157 | | - print("") |
158 | | - print("") |
159 | | - activity_num = activity_num + 1 |
160 | | - run_activity = True |
161 | | - elif activity.lower() == "next": |
162 | | - print("You are in the " + select + " muscle group. ") |
163 | | - print("The current time is: " + str(time.strftime("%H:%M:%S")) + " - " + str(date.today()-start_time) + " has elapsed.") |
164 | | - print("You have completed: " + percent(select, activity_num)) |
165 | | - if select == "abs": |
166 | | - print("Please complete 2 Sets of " + str(sunday_count[activity_num]) + " Reps of " + str(sunday[activity_num])) |
167 | | - elif select == "quads": |
168 | | - for i in range(len(monday)): |
169 | | - print(str(i+1) + ". " + str(monday[i]) + "\t 2 Sets of " + str(monday_count[i])) |
170 | | - print("") |
171 | | - elif select == "glutes": |
172 | | - for i in range(len(tuesday)): |
173 | | - print(str(i+1) + ". " + str(tuesday[i]) + "\t 2 Reps of " + str(tuesday_count[i])) |
174 | | - print("") |
175 | | - elif select == "triceps": |
176 | | - for i in range(len(wednesday)): |
177 | | - print(str(i+1) + ". " + str(wednesday[i]) + "\t 2 Reps of " + str(wednesday_count[i])) |
178 | | - print("") |
179 | | - elif select == "biceps": |
180 | | - for i in range(len(thursday)): |
181 | | - print(str(i+1) + ". " + str(thursday[i]) + "\t 2 Reps of " + str(thursday_count[i])) |
182 | | - print("") |
183 | | - elif select == "back": |
184 | | - for i in range(len(friday)): |
185 | | - print(str(i+1) + ". " + str(friday[i]) + "\t 2 Reps of " + str(friday_count[i])) |
186 | | - print("") |
187 | | - elif select == "chest": |
188 | | - for i in range(len(saturday)): |
189 | | - print(str(i+1) + ". " + str(saturday[i]) + "\t 2 Reps of " + str(saturday_count[i])) |
190 | | - print("") |
191 | | - print("") |
192 | | - activity_num = activity_num + 1 |
193 | | - run_activity = True |
194 | | - elif activity.lower() == "quit": |
195 | | - run_activity = False |
196 | | - exit() |
197 | | - break |
198 | | - else: |
199 | | - print("Sorry that is not an option. Please see this list of options below:") |
200 | | - run_activity = True |
| 1 | +# PyWORKOUT CLI |
| 2 | +# (C) 2021 - 2022 |
| 3 | + |
| 4 | +# Workout Options |
| 5 | +# Item complete - show time completed, start new time, show percentage, move to next workout |
| 6 | +# Skip |
| 7 | +# Workout finished - show total time, activities completed |
| 8 | +# Stats - time, percentage complete |
| 9 | +# Video - play video for that group |
| 10 | + |
| 11 | +# Import Statements |
| 12 | +import subprocess |
| 13 | +from datetime import datetime, date |
| 14 | +import time |
| 15 | + |
| 16 | +# Workout Lists |
| 17 | +groups = ["Abs", "Quads", "Glutes", "Triceps", "Biceps", "Back", "Chest"] |
| 18 | +abs = ["Situps\t", "Reverse Crunches", "Bicycle Crunches", "Flutter Kicks", "Leg Raises\t", "Elbow Planks\t"] |
| 19 | +abs_count = [25, 25, 25, 25, 25, 2] |
| 20 | +quads = ["Lunges\t", "High Knees\t", "Side Kicks\t", "Mountain Climbers", "Plank Jump Ins", "Lunges & Step Ups"] |
| 21 | +quads_count = [50, 50, 50, 25, 25, 50] |
| 22 | +glutes = ["Squats\t", "Donkey Kicks\t", "Bridges\t", "Step Ups\t", "Fly Steps\t", "Side Leg Raises"] |
| 23 | +glutes_count = [25, 25, 25, 25, 50, 50] |
| 24 | +triceps = ["Diamond Pushups", "Tricep Dips\t", "Tricep Extensions", "Get Ups\t", "Punches\t", "Side to Side Chops"] |
| 25 | +triceps_count = [25, 25, 25, 50, 50, 50] |
| 26 | +biceps = ["Backlists\t", "Doorframe Rows", "Decline Pushups", "Side Plank\t", "Pushups\t"] |
| 27 | +biceps_count = [50, 50, 25, 2, 25] |
| 28 | +back = ["Scapular Shrugs", "Supermans\t", "Back Lifts\t", "Arm/Leg Plank", "Reverse Angels"] |
| 29 | +back_count = [25, 25, 25, 2, 25] |
| 30 | +chest = ["Pushups\t", "Chest Expansions", "Chest Squeezes", "Pike Pushups\t", "Shoulder Taps"] |
| 31 | +chest_count = [25, 25, 25, 25, 25, 25] |
| 32 | +complete = [] |
| 33 | + |
| 34 | +# Videos |
| 35 | +def openvideo(): |
| 36 | + sunday = subprocess.Popen(["C:\Program Files\VideoLAN\VLC\vlc.exe", "file:\\\D:\Videos\Workout Videos\10 Minute Ab Workout.mp4"]) |
| 37 | + |
| 38 | +# Welcome |
| 39 | +print(" WELCOME TO PyWORKOUT") |
| 40 | +print("Please select a group from those below.") |
| 41 | +for i in range(len(groups)): |
| 42 | + print(str(i+1) + ". " + str(groups[i])) |
| 43 | +print("A reminder that today is: " + datetime.today().strftime('%A') + ". Consider option " + str(int(datetime.today().strftime('%w')) + 1) + ".") |
| 44 | + |
| 45 | +# Display Workout Options |
| 46 | +run_options = True |
| 47 | +while run_options == True: |
| 48 | + global select |
| 49 | + select = str(input("\nGroup? ")) |
| 50 | + if select.lower() == "1" or select.lower() == "abs": |
| 51 | + print("Ab muscle group selected!\n") |
| 52 | + select = "abs" |
| 53 | + run_options = False |
| 54 | + elif select.lower() == "2" or select.lower() == "quads": |
| 55 | + print("Quad muscle group selected!\n") |
| 56 | + select = "quads" |
| 57 | + run_options = False |
| 58 | + elif select.lower() == "3" or select.lower() == "glutes": |
| 59 | + print("Glutes muscle group selected!\n") |
| 60 | + select = "glutes" |
| 61 | + run_options = False |
| 62 | + elif select.lower() == "4" or select.lower() == "triceps": |
| 63 | + print("Tricep muscle group selected!\n") |
| 64 | + select = "triceps" |
| 65 | + run_options = False |
| 66 | + elif select.lower() == "5" or select.lower() == "biceps": |
| 67 | + print("Bicep muscle group selected!\n") |
| 68 | + select = "biceps" |
| 69 | + run_options = False |
| 70 | + elif select.lower() == "6" or select.lower() == "back": |
| 71 | + print("Back muscle group selected!\n") |
| 72 | + select = "back" |
| 73 | + run_options = False |
| 74 | + elif select.lower() == "7" or select.lower() == "chest": |
| 75 | + print("Chest muscle group selected!\n") |
| 76 | + select = "chest" |
| 77 | + run_options = False |
| 78 | + elif select.lower() == "quit": |
| 79 | + exit() |
| 80 | + break |
| 81 | + else: |
| 82 | + print("Sorry that is incorrect. Please try again!") |
| 83 | + run_options = True |
| 84 | + |
| 85 | +# Ask What They Want to Do |
| 86 | +run_activity = True |
| 87 | +while run_activity == True: |
| 88 | + activity = str(input("What do you want to do? ")) |
| 89 | + if activity.lower() == "list": |
| 90 | + if select == "abs": |
| 91 | + for i in range(len(abs)): |
| 92 | + print(str(i+1) + ". " + str(abs[i]) + "\t 2 Sets of " + str(abs_count[i]) + " Reps") |
| 93 | + print("") |
| 94 | + elif select == "quads": |
| 95 | + for i in range(len(quads)): |
| 96 | + print(str(i+1) + ". " + str(quads[i]) + "\t 2 Sets of " + str(quads_count[i]) + " Reps") |
| 97 | + print("") |
| 98 | + elif select == "glutes": |
| 99 | + for i in range(len(glutes)): |
| 100 | + print(str(i+1) + ". " + str(glutes[i]) + "\t 2 Sets of " + str(glutes_count[i]) + " Reps") |
| 101 | + print("") |
| 102 | + elif select == "triceps": |
| 103 | + for i in range(len(glutes)): |
| 104 | + print(str(i+1) + ". " + str(triceps[i]) + "\t 2 Sets of " + str(triceps_count[i]) + " Reps") |
| 105 | + print("") |
| 106 | + elif select == "biceps": |
| 107 | + for i in range(len(biceps)): |
| 108 | + print(str(i+1) + ". " + str(biceps[i]) + "\t 2 Sets of " + str(biceps_count[i]) + " Reps") |
| 109 | + print("") |
| 110 | + elif select == "back": |
| 111 | + for i in range(len(back)): |
| 112 | + print(str(i+1) + ". " + str(back[i]) + "\t 2 Sets of " + str(back_count[i]) + " Reps") |
| 113 | + print("") |
| 114 | + elif select == "chest": |
| 115 | + for i in range(len(chest)): |
| 116 | + print(str(i+1) + ". " + str(chest[i]) + "\t 2 Sets of " + str(chest_count[i]) + " Reps") |
| 117 | + print("") |
| 118 | + run_activity = True |
| 119 | + elif activity.lower() == "start": |
| 120 | + global activity_num |
| 121 | + global start_time |
| 122 | + start_time = date.today() |
| 123 | + activity_num = 0 |
| 124 | + print("You have started the " + select + " muscle group. ") |
| 125 | + print("The current time is: " + str(time.strftime("%H:%M:%S")) + " - " + str(date.today()-start_time) + " has elapsed.") |
| 126 | + if select == "abs": |
| 127 | + print("You have completed: " + str((int(activity_num/len(abs_count)))) + "%") |
| 128 | + print("Please complete 2 Sets of " + str(abs_count[activity_num]) + " Reps of " + str(abs[activity_num])) |
| 129 | + elif select == "quads": |
| 130 | + print("You have completed: " + str((int(activity_num/len(quads_count)))) + "%") |
| 131 | + print("Please complete 2 Sets of " + str(quads_count[activity_num]) + " Reps of " + str(quads[activity_num])) |
| 132 | + elif select == "glutes": |
| 133 | + print("You have completed: " + str((int(activity_num/len(glutes_count)))) + "%") |
| 134 | + print("Please complete 2 Sets of " + str(glutes_count[activity_num]) + " Reps of " + str(glutes[activity_num])) |
| 135 | + elif select == "triceps": |
| 136 | + print("You have completed: " + str((int(activity_num/len(triceps_count)))) + "%") |
| 137 | + print("Please complete 2 Sets of " + str(triceps_count[activity_num]) + " Reps of " + str(triceps[activity_num])) |
| 138 | + elif select == "biceps": |
| 139 | + print("You have completed: " + str((int(activity_num/len(biceps_count)))) + "%") |
| 140 | + print("Please complete 2 Sets of " + str(biceps_count[activity_num]) + " Reps of " + str(biceps[activity_num])) |
| 141 | + elif select == "back": |
| 142 | + print("You have completed: " + str((int(activity_num/len(back_count)))) + "%") |
| 143 | + print("Please complete 2 Sets of " + str(back_count[activity_num]) + " Reps of " + str(back[activity_num])) |
| 144 | + elif select == "chest": |
| 145 | + print("You have completed: " + str((int(activity_num/len(chest_count)))) + "%") |
| 146 | + print("Please complete 2 Sets of " + str(chest_count[activity_num]) + " Reps of " + str(chest[activity_num])) |
| 147 | + print("") |
| 148 | + activity_num = activity_num + 1 |
| 149 | + run_activity = True |
| 150 | + elif activity.lower() == "next": |
| 151 | + print("You are in the " + select + " muscle group. ") |
| 152 | + print("The current time is: " + str(time.strftime("%H:%M:%S")) + " - " + str(date.today()-start_time) + " has elapsed.") |
| 153 | + if select == "abs": |
| 154 | + print("You have completed: " + str((int(activity_num/len(abs_count)))) + "%") |
| 155 | + print("Please complete 2 Sets of " + str(abs_count[activity_num]) + " Reps of " + str(abs[activity_num])) |
| 156 | + elif select == "quads": |
| 157 | + print("You have completed: " + str((int(activity_num/len(quads_count)))) + "%") |
| 158 | + print("Please complete 2 Sets of " + str(quads_count[activity_num]) + " Reps of " + str(quads[activity_num])) |
| 159 | + elif select == "glutes": |
| 160 | + print("You have completed: " + str((int(activity_num/len(glutes_count)))) + "%") |
| 161 | + print("Please complete 2 Sets of " + str(glutes_count[activity_num]) + " Reps of " + str(glutes[activity_num])) |
| 162 | + elif select == "triceps": |
| 163 | + print("You have completed: " + str((int(activity_num/len(triceps_count)))) + "%") |
| 164 | + print("Please complete 2 Sets of " + str(triceps_count[activity_num]) + " Reps of " + str(triceps[activity_num])) |
| 165 | + elif select == "biceps": |
| 166 | + print("You have completed: " + str((int(activity_num/len(biceps_count)))) + "%") |
| 167 | + print("Please complete 2 Sets of " + str(biceps_count[activity_num]) + " Reps of " + str(biceps[activity_num])) |
| 168 | + elif select == "back": |
| 169 | + print("You have completed: " + str((int(activity_num/len(back_count)))) + "%") |
| 170 | + print("Please complete 2 Sets of " + str(back_count[activity_num]) + " Reps of " + str(back[activity_num])) |
| 171 | + elif select == "chest": |
| 172 | + print("You have completed: " + str((int(activity_num/len(chest_count)))) + "%") |
| 173 | + print("Please complete 2 Sets of " + str(chest_count[activity_num]) + " Reps of " + str(chest[activity_num])) |
| 174 | + activity_num = activity_num + 1 |
| 175 | + run_activity = True |
| 176 | + elif activity.lower() == "quit": |
| 177 | + run_activity = False |
| 178 | + exit() |
| 179 | + break |
| 180 | + else: |
| 181 | + print("Sorry that is not an option. Please see this list of options below:") |
| 182 | + run_activity = True |
0 commit comments