-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.py
46 lines (32 loc) · 839 Bytes
/
start.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Libraries
import sys
from functions import *
# Classes
class Colors:
END_C = "\033[0m"
BLUE_C = "\033[94m"
RED_C = "\033[91m"
# Constants
IS_UNIX = False
# Checks
sys_argv = sys.argv
if len(sys_argv) < 2:
# Error
print(Colors.RED_C + "ERROR: Please provide the source." + Colors.END_C)
else:
# Location
location = sys_argv[1].strip()
# Clear terminal
if IS_UNIX:
os.system("clear")
else:
os.system("cls")
# Destination
with open("./destination.txt", "r") as file:
destination = str(file.read())
if destination[len(destination) - 1] == "/":
destination = destination[:-1]
# Initial print
print(Colors.BLUE_C + "WELCOME!!!\n" + f"Source: {location}" + Colors.END_C + "\n")
# Scan files
scan(location, 0, destination)