mirror of
https://github.com/AleksanderGPL/eCLI.git
synced 2024-12-29 01:09:02 +00:00
Create eCLI.py
This commit is contained in:
parent
2b5c38a552
commit
d658fd0c95
54
eCLI.py
Normal file
54
eCLI.py
Normal file
@ -0,0 +1,54 @@
|
||||
import sys
|
||||
import os
|
||||
import platform
|
||||
import colorama
|
||||
from colorama import Fore, Back, Style
|
||||
colorama.init()
|
||||
|
||||
print(Fore.BLUE + "eCLI on " + Fore.RED + platform.system(),platform.machine())
|
||||
print(Fore.BLUE + "Type " + Fore.RED + "help" + Fore.BLUE + " for help.")
|
||||
print(" ")
|
||||
|
||||
|
||||
while True:
|
||||
command = input(Fore.BLUE + "eCLI>" + Fore.GREEN + " ")
|
||||
if command == "exit":
|
||||
print("Goodbye!")
|
||||
sys.exit()
|
||||
elif command == "clear":
|
||||
if os.name == "nt":
|
||||
os.system("cls")
|
||||
else:
|
||||
os.system("clear")
|
||||
elif command == "pcinfo":
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
print(Fore.RED + "Computer Name: " + Fore.GREEN + platform.node())
|
||||
print(Fore.RED + "Computer Type: " + Fore.GREEN + platform.machine())
|
||||
print(Fore.RED + "Computer Arch: " + Fore.GREEN + platform.architecture()[0])
|
||||
print(Fore.RED + "Computer OS: " + Fore.GREEN + platform.system())
|
||||
print(Fore.RED + "Computer OS Version: " + Fore.GREEN + platform.version())
|
||||
print(Fore.RED + "Computer OS Release: " + Fore.GREEN + platform.release())
|
||||
print(Fore.RED + "Computer OS Platform: " + Fore.GREEN + platform.platform())
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
elif command == "help":
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
print(Fore.RED + "eCLI Help")
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
print(Fore.RED + "pcinfo" + Fore.GREEN + " - Displays information about the computer")
|
||||
print(Fore.RED + "info" + Fore.GREEN + " - Displays information about eCLI")
|
||||
print(Fore.RED + "help" + Fore.GREEN + " - Displays this help menu")
|
||||
print(Fore.RED + "clear" + Fore.GREEN + " - Clears the screen")
|
||||
print(Fore.RED + "exit" + Fore.GREEN + " - Exits the program")
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
elif command == "info":
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
print(Fore.RED + "eCLI Info")
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
print(Fore.RED + "Version: " + Fore.GREEN + "1.0")
|
||||
print(Fore.RED + "Author: " + Fore.GREEN + "@AleksanderGPL")
|
||||
print(Fore.RED + "Github: " + Fore.GREEN + "https://github.com/AleksanderGPL/eCLI")
|
||||
print(Fore.YELLOW + "=============================================================")
|
||||
else:
|
||||
print(Fore.RED + "Unknown command: " + Fore.GREEN + command)
|
||||
print(Fore.BLUE + "Type " + Fore.RED + "help" + Fore.BLUE + " for help.")
|
||||
print(" ")
|
Loading…
Reference in New Issue
Block a user