Skip to content

Commit 156ff2a

Browse files
committed
Update console scripts
1 parent 5bdc2f5 commit 156ff2a

File tree

2 files changed

+54
-4
lines changed

2 files changed

+54
-4
lines changed

seleniumbase/console_scripts/logo_helper.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
http://www.patorjk.com/software/taag/#p=display&f=Slant&t=SeleniumBase """
44

55
import colorama
6+
import os
67
import sys
8+
from contextlib import suppress
79

810
r"""
911
______ __ _ ____
@@ -66,4 +68,49 @@ def get_seleniumbase_logo():
6668
sb += " "
6769
sb += cr
6870
sb += cr
71+
with suppress(Exception):
72+
terminal_width = os.get_terminal_size().columns
73+
if isinstance(terminal_width, int) and terminal_width >= 66:
74+
return sb
75+
76+
# If the logo is wider than the screen width, use a smaller one:
77+
r"""
78+
___ _ _ ___
79+
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
80+
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
81+
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
82+
"""
83+
sb = " "
84+
sb += cr
85+
sb += "\n"
86+
sb += c1
87+
sb += " ___ _ _ "
88+
sb += c2
89+
sb += " ___ "
90+
sb += cr
91+
sb += "\n"
92+
sb += c1
93+
sb += "/ __| ___| |___ _ _ (_)_ _ _ __ "
94+
sb += c2
95+
sb += "| _ ) __ _ ______ "
96+
sb += cr
97+
sb += "\n"
98+
sb += c1
99+
sb += "\\__ \\/ -_) / -_) ' \\| | \\| | ' \\ "
100+
sb += c2
101+
sb += "| _ \\/ _` (_-< -_)"
102+
sb += cr
103+
sb += "\n"
104+
sb += c1
105+
sb += "|___/\\___|_\\___|_||_|_|\\_,_|_|_|_\\"
106+
sb += c2
107+
sb += "|___/\\__,_/__|___|"
108+
sb += cr
109+
sb += "\n"
110+
sb += c3
111+
sb += " "
112+
sb += c4
113+
sb += " "
114+
sb += cr
115+
sb += cr
69116
return sb

seleniumbase/console_scripts/run.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
def show_usage():
5555
show_basic_usage()
5656
sc = ""
57-
sc += ' Type "sbase help [COMMAND]" for specific command info.\n'
58-
sc += ' For info on all commands, type: "seleniumbase --help".\n'
57+
sc += ' Type "sbase help [COMMAND]" for specific info.\n'
58+
sc += ' For all commands, type: "seleniumbase --help".\n'
5959
sc += ' Use "pytest" for running tests.\n'
6060
if "linux" not in sys.platform:
6161
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
@@ -76,12 +76,15 @@ def show_basic_usage():
7676

7777
seleniumbase_logo = logo_helper.get_seleniumbase_logo()
7878
print(seleniumbase_logo)
79+
time.sleep(0.044)
7980
print("")
80-
time.sleep(0.28) # Enough time to see the logo
81+
time.sleep(0.033)
8182
show_package_location()
83+
time.sleep(0.032)
8284
show_version_info()
85+
time.sleep(0.031)
8386
print("")
84-
time.sleep(0.62) # Enough time to see the version
87+
time.sleep(0.68) # Enough time to see the logo & version
8588
sc = ""
8689
sc += ' * USAGE: "seleniumbase [COMMAND] [PARAMETERS]"\n'
8790
sc += ' * OR: "sbase [COMMAND] [PARAMETERS]"\n'

0 commit comments

Comments
 (0)