-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.py
More file actions
21 lines (13 loc) · 719 Bytes
/
options.py
File metadata and controls
21 lines (13 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import argparse
def init_parser():
parser = argparse.ArgumentParser(description="Simple Version Control Tool")
subparsers = parser.add_subparsers(dest="command",required=True)
parser_init = subparsers.add_parser("init",help="Initialize Empty Repo")
parser_add = subparsers.add_parser("add",help="Add file to repo")
parser_add.add_argument("file",type=str,help="File to add")
parser_commit = subparsers.add_parser("commit",help="Commit changes to repo")
parser_commit.add_argument("-m",type=str,help="commit message")
parser_status = subparsers.add_parser("status",help="Get Current Snapshot of the repo")
return parser
if __name__ == "__main__":
init_parser();