21 lines
709 B
Python
21 lines
709 B
Python
import argparse
|
|
|
|
# Initialize the argument parser
|
|
parser = argparse.ArgumentParser(description='Project Manager CLI')
|
|
|
|
# Add subcommands for add, list, and complete
|
|
subparsers = parser.add_subparsers(dest='command', help='Sub-commands help')
|
|
add_parser = subparsers.add_parser('add', help='Add a new task')
|
|
list_parser = subparsers.add_parser('list', help='List all tasks')
|
|
complete_parser = subparsers.add_parser('complete', help='Mark a task as complete')
|
|
|
|
# Parse the arguments
|
|
args = parser.parse_args()
|
|
|
|
if args.command == 'add':
|
|
print(f'Adding new task...')
|
|
elif args.command == 'list':
|
|
print(f'Listing all tasks...')
|
|
elif args.command == 'complete':
|
|
print(f'Marking a task as complete...')
|