Skip to content

Commit

Permalink
Update console scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmintz committed Sep 26, 2024
1 parent 5bdc2f5 commit 156ff2a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
47 changes: 47 additions & 0 deletions seleniumbase/console_scripts/logo_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
http://www.patorjk.com/software/taag/#p=display&f=Slant&t=SeleniumBase """

import colorama
import os
import sys
from contextlib import suppress

r"""
______ __ _ ____
Expand Down Expand Up @@ -66,4 +68,49 @@ def get_seleniumbase_logo():
sb += " "
sb += cr
sb += cr
with suppress(Exception):
terminal_width = os.get_terminal_size().columns
if isinstance(terminal_width, int) and terminal_width >= 66:
return sb

# If the logo is wider than the screen width, use a smaller one:
r"""
___ _ _ ___
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
"""
sb = " "
sb += cr
sb += "\n"
sb += c1
sb += " ___ _ _ "
sb += c2
sb += " ___ "
sb += cr
sb += "\n"
sb += c1
sb += "/ __| ___| |___ _ _ (_)_ _ _ __ "
sb += c2
sb += "| _ ) __ _ ______ "
sb += cr
sb += "\n"
sb += c1
sb += "\\__ \\/ -_) / -_) ' \\| | \\| | ' \\ "
sb += c2
sb += "| _ \\/ _` (_-< -_)"
sb += cr
sb += "\n"
sb += c1
sb += "|___/\\___|_\\___|_||_|_|\\_,_|_|_|_\\"
sb += c2
sb += "|___/\\__,_/__|___|"
sb += cr
sb += "\n"
sb += c3
sb += " "
sb += c4
sb += " "
sb += cr
sb += cr
return sb
11 changes: 7 additions & 4 deletions seleniumbase/console_scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
def show_usage():
show_basic_usage()
sc = ""
sc += ' Type "sbase help [COMMAND]" for specific command info.\n'
sc += ' For info on all commands, type: "seleniumbase --help".\n'
sc += ' Type "sbase help [COMMAND]" for specific info.\n'
sc += ' For all commands, type: "seleniumbase --help".\n'
sc += ' Use "pytest" for running tests.\n'
if "linux" not in sys.platform:
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
Expand All @@ -76,12 +76,15 @@ def show_basic_usage():

seleniumbase_logo = logo_helper.get_seleniumbase_logo()
print(seleniumbase_logo)
time.sleep(0.044)
print("")
time.sleep(0.28) # Enough time to see the logo
time.sleep(0.033)
show_package_location()
time.sleep(0.032)
show_version_info()
time.sleep(0.031)
print("")
time.sleep(0.62) # Enough time to see the version
time.sleep(0.68) # Enough time to see the logo & version
sc = ""
sc += ' * USAGE: "seleniumbase [COMMAND] [PARAMETERS]"\n'
sc += ' * OR: "sbase [COMMAND] [PARAMETERS]"\n'
Expand Down

0 comments on commit 156ff2a

Please sign in to comment.