-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (21 loc) · 788 Bytes
/
main.py
File metadata and controls
29 lines (21 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import argparse
import os
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--create', type=bool, default=False,
help="Create a new repository.")
parser.add_argument('--update', type=bool, defulat=False,
help="Update your existing repository.")
args = parser.parse_args()
if args.create:
from src import createFunctions
repoName = createFunctions.main()
print(f"Created {repoName} in repo/")
elif args.update:
from src import updateFunctions
repoName = updateFunctions.main()
print(f"Updated {repoName} in repo/")
else:
print("Please either add --create or --update after main.py.")
if __name__ == '__main__':
main()