def task_show_parser(show_subparser: argparse): task_show = show_subparser.add_subparsers( dest='show_type', title='Show tasks info', metavar='', description='Commands to show tasks') task_show.required = True task_id = task_show.add_parser('id', help='Show task by id') task_id.add_argument('task_id', help='Task id', type=valid_int) task_show.add_parser('own', help='Show tasks created by user') subtasks = task_show.add_parser('subtasks', help='Show subtasks by task id') subtasks.add_argument('task_id', type=valid_int) task_show.add_parser('all', help='Show all tasks user can access') task_show.add_parser('assigned', help='Show tasks assigned on user') task_show.add_parser('todo', help='Show todo tasks') task_show.add_parser('inwork', help='Show inwork tasks') task_show.add_parser('done', help='Show done tasks') task_show.add_parser('archived', help='Show archived tasks') task_show.add_parser('planless', help='Show tasks without plan')
def plan_show_parser(sup_parser: argparse): plan_show = sup_parser.add_subparsers(dest='show_type', title='Show plan and its info', metavar='', description='Commands to show plans') plan_show.required = True plan_id = plan_show.add_parser('id', help='Show plan by id') plan_id.add_argument('plan_id', help='Plan id', type=valid_int) plan_id.add_argument('--tasks', action='store_true', help='Show plan. Task and generated tasks') plan_all = plan_show.add_parser('all', help='Show all plans') plan_all.add_argument('--tasks', action='store_true', help='Show plan. Task and generated tasks')
def folder_show_parser(show_subparser: argparse): task_show = show_subparser.add_subparsers( dest='show_type', title='Show folders and its info', metavar='', description='Commands to show folders') task_show.required = True folder_id = task_show.add_parser('id', help='Show folder by id') folder_id.add_argument('folder_id', help='Folder id', type=valid_int) folder_id.add_argument('--tasks', action='store_true', help='Show folder tasks') folder_all = task_show.add_parser('all', help='Show all folders') folder_all.add_argument('--tasks', action='store_true', help='Show folder_tasks')
def reminder_show_parser(sup_parser: argparse): reminder_show = sup_parser.add_subparsers( dest='show_type', title='Show reminders and its info', metavar='', description='Commands to show reminders') reminder_show.required = True reminder_id = reminder_show.add_parser('id', help='Show reminder by id') reminder_id.add_argument('reminder_id', help='Reminder id', type=valid_int) reminder_id.add_argument('--task', action='store_true', help='Show reminder and its task') reminder_all = reminder_show.add_parser('all', help='Show all reminders') reminder_all.add_argument('--tasks', action='store_true', help='Show reminders and its tasks')