def coach(self, exercise, rest_duration, workout_list): """ Coaches the given scheme of the given exercise. @param exercise: The given exercise. @param rest_duration: The amount of rest between each set. @param workout_list: The list of reps in the sets. @return: """ for w in workout_list[:-1]: speech.say(str(w) + " " + exercise + ", Sir.") if not inputs.get_boolean(): speech.say("Done, Sir?") if inputs.get_boolean(): self.debug("Exiting.") return if not self.get_debug(): speech.say_random_from_file(self.get_resource_path('break.paula_says')) self.rest(rest_duration) speech.say("For the last set, do at least " + str(workout_list[-1]) + " " + exercise + ", Sir.") if not inputs.get_boolean(): speech.say("Too bad, Sir.") return speech.say_random_from_file(self.get_resource_path('done.paula_says'))
def check(self): """ Check every item on this checklist, according to the appropriate settings. """ if self.options["reversed"]: self.items.reverse() not_yet = [] for item in self.items: speech.say(item, sync=True) if not self.options["continuous"]: got_it = inputs.get_boolean() if not got_it: not_yet.append(item) if not_yet and not self.options["continuous"]: print("Left to get: " + " ".join(not_yet))