def update_command(t=-1, p=-1, n=-1, r=-1, **kwargs): """ Update a project, task or note with the supplied kwargs. """ c = conn() if t > 0: Task.update(c, t, kwargs) elif n > 0: Note.update(c, n, kwargs) elif p > 0: Project.update(c, p, kwargs) elif r > 0: Recipe.update(c, r, kwargs) else: raise Exception("Must specify one of t (task), n (note), p (project) or r (recipe).")