Files
swingmusic-extended/app/start_info_logger.py
T
cwilvx b40f05cc7c implement CLI password recovery (hacky :omg:)
+ rewrite migrations logic
+ rename encode_password to hash_password
+ update image sizes (add medium size)
+ rename image endpoints
2024-05-11 21:26:03 +03:00

30 lines
827 B
Python

import os
from app.settings import FLASKVARS, TCOLOR, Info, Paths
from app.utils.network import get_ip
def log_startup_info():
lines = "------------------------------"
# clears terminal 👇
# os.system("cls" if os.name == "nt" else "echo -e \\\\033c")
print(lines)
print(f"{TCOLOR.HEADER}Swing Music v{Info.SWINGMUSIC_APP_VERSION} {TCOLOR.ENDC}")
adresses = [FLASKVARS.get_flask_host()]
if FLASKVARS.get_flask_host() == "0.0.0.0":
adresses = ["localhost", get_ip()]
print("Started app on:")
for address in adresses:
# noinspection HttpUrlsUsage
print(
f"{TCOLOR.OKGREEN}http://{address}:{FLASKVARS.get_flask_port()}{TCOLOR.ENDC}"
)
print(lines + "\n")
print(f"{TCOLOR.YELLOW}Data folder: {Paths.get_app_dir()}{TCOLOR.ENDC}")