Skip to content

Commit

Permalink
Improve banner printing
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyscripts committed Jan 15, 2025
1 parent d238c06 commit a51a2f2
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions utils/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,32 @@ def get_formatted_time():

def print_banner():
copyright_ = f"( Ghost v{config.VERSION} )"
banner = f""" ██████╗ ██╗ ██╗ ██████╗ ███████╗████████╗
██╔════╝ ██║ ██║██╔═══██╗██╔════╝╚══██╔══╝
██║ ███╗███████║██║ ██║███████╗ ██║
██║ ██║██╔══██║██║ ██║╚════██║ ██║
╚██████╔╝██║ ██║╚██████╔╝███████║ ██║
╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝
total_width = 90
copyright_length = len(copyright_)
dashes_length = (total_width - copyright_length) // 2
dashes = "—" * dashes_length
banner_line = f"{dashes}{copyright_}{dashes}"

if len(banner_line) < total_width:
banner_line += "—"

banner = f""" ██████╗ ██╗ ██╗ ██████╗ ███████╗████████╗
██╔════╝ ██║ ██║██╔═══██╗██╔════╝╚══██╔══╝
██║ ███╗███████║██║ ██║███████╗ ██║
██║ ██║██╔══██║██║ ██║╚════██║ ██║
╚██████╔╝██║ ██║╚██████╔╝███████║ ██║
╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝
"""
print(colorama.Fore.LIGHTBLUE_EX + colorama.Style.BRIGHT)

# banner = banner.replace("█", f"{colorama.Fore.LIGHTBLUE_EX}{colorama.Style.BRIGHT}█{colorama.Style.RESET_ALL}")
# banner = banner.replace("╗", f"{colorama.Fore.WHITE}{colorama.Style.DIM}╗{colorama.Style.RESET_ALL}")
# banner = banner.replace("║", f"{colorama.Fore.WHITE}{colorama.Style.DIM}║{colorama.Style.RESET_ALL}")
# banner = banner.replace("═", f"{colorama.Fore.WHITE}{colorama.Style.DIM}═{colorama.Style.RESET_ALL}")
# banner = banner.replace("╝", f"{colorama.Fore.WHITE}{colorama.Style.DIM}╝{colorama.Style.RESET_ALL}")
# banner = banner.replace("╔", f"{colorama.Fore.WHITE}{colorama.Style.DIM}╔{colorama.Style.RESET_ALL}")
# banner = banner.replace("╚", f"{colorama.Fore.WHITE}{colorama.Style.DIM}╚{colorama.Style.RESET_ALL}")

print(pystyle.Center.XCenter(banner))

print(f"{colorama.Style.NORMAL}{colorama.Fore.WHITE}")
print(pystyle.Center.XCenter(config.MOTD))
print()
print(f"{colorama.Fore.BLUE}—————————————————————————————————————{copyright_}—————————————————————————————————————")
print(f"{colorama.Fore.BLUE}{banner_line}")
print(f"{colorama.Style.RESET_ALL}")


def print_color(color, text):
print(color + text + colorama.Style.RESET_ALL)

Expand Down Expand Up @@ -80,5 +80,5 @@ def print_sniper(sniper, title, description: dict, success=True):

for key, value in description.items():
print(f"{' '*10} {colorama.Fore.LIGHTYELLOW_EX}{colorama.Style.NORMAL}{key}: {colorama.Style.RESET_ALL}{value}")
print()

print()

0 comments on commit a51a2f2

Please sign in to comment.