Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/reclaim/commands/create-task.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ def parse_args(self, subparsers):
"title", type=str, metavar="<title>", help="title of the task"
)

subparser.add_argument(
"-n",
"--notes",
type=str,
metavar="<text>",
help="notes/description for the task",
default=None,
)
subparser.add_argument(
"-d",
"--due",
Expand Down Expand Up @@ -87,6 +95,8 @@ def run(self, args):
task_args = {"title": args.title}

# Prepare optional arguments
if args.notes:
task_args["notes"] = args.notes
if args.due:
task_args["due"] = args.due
if args.snooze_until:
Expand Down
10 changes: 10 additions & 0 deletions src/reclaim/commands/edit-task.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ def parse_args(self, subparsers):
help="title of the task",
default=None,
)
subparser.add_argument(
"-n",
"--notes",
type=str,
metavar="<text>",
help="notes/description for the task",
default=None,
)
subparser.add_argument(
"-d",
"--due",
Expand Down Expand Up @@ -92,6 +100,8 @@ def run(self, args):

if args.title:
task.title = args.title
if args.notes is not None:
task.notes = args.notes
if args.due:
task.due = args.due
if args.snooze_until:
Expand Down
4 changes: 4 additions & 0 deletions src/reclaim/commands/show-task.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,8 @@ def format_date(date):
console = Console()
console.print(f"Task {tid}: {task.title}", style="bold underline")
console.print(grid)
if task.notes:
console.print()
console.print("Notes:", style="bold")
console.print(task.notes)
return task