-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.py
50 lines (39 loc) · 1.37 KB
/
interface.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from calories_intake import CalculateCaloriesIntake
from build_workout import Workout
from send_workout_to_email import send_email
from actions import add_exercise_to_accessory
from UserInformation import UserInformation
from exception import WrongUserInfo, CaloriesError, WorkoutError, WrongEmailError, WrongExercise
def save_your_name_to_app():
try:
u = UserInformation()
u.save_info_to_csv_folder()
# print(u.save_info_to_csv_folder())
except WrongUserInfo:
print('Please re-enter your details.. ')
def calculate_your_calories():
try:
c = CalculateCaloriesIntake()
c.daily_calories_intake()
# print(c.daily_calories_intake())
except CaloriesError:
print('Please re-enter your details for calories calculator..')
def build_workout_for_today():
try:
p = Workout()
p.build_workout()
except WorkoutError:
print('Please try again..')
def add_your_exercises_to_the_plan():
try:
data = {"Name": "FLOOR PRESS", "Version": "LANDMINE"}
add_exercise_to_accessory(new_data=data)
except WrongExercise:
print('Try adding exercise again')
def send_your_workout_to_email():
try:
w = Workout()
send_email(message=str(w.build_workout()))
print('Sending workout...')
except WrongEmailError:
print('Wrong email address..')