X-Git-Url: https://apps.delaporte.us/gitweb/matrix-goal-bot.git/blobdiff_plain/41cec29a738f15fd16ef4f1b6f52cbd399ebf721..HEAD:/matrix_goal_bot/tasks.py diff --git a/matrix_goal_bot/tasks.py b/matrix_goal_bot/tasks.py index a957f37..61413ec 100644 --- a/matrix_goal_bot/tasks.py +++ b/matrix_goal_bot/tasks.py @@ -12,6 +12,12 @@ def add_goal(c, name): result = Data().add_goal(name) print(result) +@task +def add_vision(c, name): + result = Data().add_vision(name) + print(result) + + @task def close_goal(c, goal_id): result = Data().complete_goal(goal_id) @@ -41,13 +47,20 @@ def remove_task(c, goal_id, name): print(result) - @task def list(c): goals = Data().get_current_goals() for goal in goals: print(goal) + +@task +def list_visions(c): + items = Data().get_all_visions() + for item in items: + print(item) + + @task def later(c, goal_id): result = Data().put_off_goal(goal_id) @@ -81,9 +94,31 @@ def print_goal(c, goal_id): for line in results: print(line) +@task +def start(c, goal_id): + vision, goals = Data().start_goal(goal_id) + results = pretty_print(vision, goals) + for line in results: + print(line) + @task def clear(c, goal_id): results = Data().clear(goal_id) print(results) +@task +def setup(c): + results = Data().setup() + print(results) + +@task +def wins(c): + results = Data().wins() + for line in results: + print(line) + +@task +def assign_to_vision(c, goal_id, vision_id): + result = Data().assign_vision(goal_id, vision_id) + print(result)