-
-
Notifications
You must be signed in to change notification settings - Fork 0
Customization
William edited this page Mar 7, 2022
·
2 revisions
PyWorkout has been designed to be heavily customizable. More workouts can be added, lengths can be changed, and videos can be used from different sources.
All of these instructions require Python and a text editor to be installed.
To add a workout, you follow many of the same steps as adding a muscle group.
- Open the
main.py
file with a text editor. - Navigate to the
# Workout Lists
section. - Find the variables for the muscle group you want to add this workout to. For example, select the
ab
muscle group. These are the two variables you need:
abs = ["Situps\t", "Reverse Crunches", "Bicycle Crunches", "Flutter Kicks", "Leg Raises\t", "Elbow Planks\t"]
abs_count = [25, 25, 25, 25, 25, 2]
- Add the name of the activity to the first list, in between double quotes (
""
). - Add the number of reps for that activity to the second list.
- Navigate to the
elif activity.lower() == "next":
line. - Find the
if
/elif
statement for the muscle group you have selected. For example:
if select == "abs":
if activity_num < 6:
print("You have completed: " + str((int(activity_num/len(abs_count)*100))) + "%")
print("Please complete 2 Sets of " + str(abs_count[activity_num]) + " Reps of " + str(abs[activity_num]) + "\n")
complete.append(abs[activity_num])
else:
print("You have completed all the workouts for this set!")
print("Run the `end` command to finish the workout. \n")
- Increase the number in the second line by the number of workouts you have added.
- Save and run the program!
Changing the number of reps of a workout is extremely easy!
- Open the
main.py
file with a text editor. - Navigate to the
# Workout Lists
section. - Find the variables that end with
..._count
. They should look like this:
abs_count = [25, 25, 25, 25, 25, 2]
- Change the number to the actual number of that workout that you want to do. Each item in the list corresponds to the workout activity list in the variable above it. For example, the
abs
andabs_count
list correspond to one another. - Save the file and run the program!
Changing the video address is extremely easy as well!
- Choose your videos. I recommend workout videos by Pamela Reif. They can be downloaded from the internet or created yourself.
- Open the
main.py
file with a text editor. - Navigate to the
# Video File Paths
section. It looks like this:
# Video File Paths
abs_video = "D:\\Videos\\Workout Videos\\10 Minute Ab Workout.mp4" # change these to personal video path
quads_video = "D:\\Videos\\Workout Videos\\12 Min Leg Workout.mp4"
glutes_video = "D:\\Videos\\Workout Videos\\10 Minute Glute Bridge Workout.mp4"
triceps_video = "D:\\Videos\\Workout Videos\\10 Minute Upper Body Workout.mp4"
biceps_video = "D:\\Videos\\Workout Videos\\15 Minute Full Body HIIT Workout.mp4"
back_video = "D:\\Videos\\Workout Videos\\20 Minute Full Body Workout.mp4"
chest_video = "D:\\Videos\\Workout Videos\\15 Minute Intense Bodyweight Workout.mp4"
- Change each of the variables to the absolute path of the video you want for each muscle group. Double slashes (
\\
) are only required on Windows. - Save the file and run the program!
Want to make a change? Open an issue!
Want a basic overview? Read the README
.
Want to download the project? Head to the Releases page.
Want to start contributing? Open an Issue or a Pull Request.