-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (19 loc) · 784 Bytes
/
main.py
File metadata and controls
29 lines (19 loc) · 784 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 time
import typer
from typing import Optional
from display import display
from logic.traverse import get_info
app = typer.Typer()
@app.command()
def perform(dir: str,
thr: Optional[int] = typer.Option(None, "--thr", help="Threshold value"),
rep: bool = typer.Option(False, "--rep", help="Flag to get permission report"),
ctg: bool = typer.Option(False, "--ctg", help="Flag to get categories report"),
dsp: bool = typer.Option(False, "--dsp", help="Flag to display file tree")):
start_time = time.time()
if dsp == True:
display(dir)
get_info(dir, thr, rep, ctg)
print("--- %s seconds ---" % (time.time() - start_time))
if __name__ == "__main__":
app()