()
| 86 | |
| 87 | |
| 88 | def welcome(): |
| 89 | lines = [] # type: List[Union[str, Tuple[str, str]]] |
| 90 | |
| 91 | lines.append( r' /#############/ /#\ ') |
| 92 | lines.append( r' /#############/ /###\ _ __ _______ _______ ______ _______ ______ (R)') |
| 93 | lines.append( r' /#############/ /#####\ | | / / | ____/ | ____/ | ___ \ | ____/ | ___ \ ') |
| 94 | lines.append( r' /######/ \######\ | | / / | |____ | |____ | | __| || |____ | | __| | ') |
| 95 | lines.append( r' /######/ \######\ | |< < | ___/ | ___/ | |/___/ | ___/ | |/_ / ') |
| 96 | lines.append( r' /######/ \######\ | | \ \ | |_____ | |_____ | | | |_____ | | \ \ ') |
| 97 | lines.append( r' \######\ /######/ |_| \_\ |_______||_______||_| |_______||_| \_\ ') |
| 98 | lines.append((r' \######\ /######/', r' ____ _ ')) |
| 99 | lines.append((r' \######\ /######/ ', r' / ___|___ _ __ ___ _ __ ___ __ _ _ __ __| | ___ _ __ ')) |
| 100 | lines.append((r' \#############\ \#####/ ', r" / / / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` |/ _ \ '__| ")) |
| 101 | lines.append((r' \#############\ \###/ ', r' \ \__| (_) | | | | | | | | | | | (_| | | | | (_| | __/ | ')) |
| 102 | lines.append((r' \#############\ \#/ ', r' \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|\___|_| ')) |
| 103 | lines.append('') |
| 104 | |
| 105 | try: |
| 106 | width = shutil.get_terminal_size(fallback=(160, 50)).columns |
| 107 | except: |
| 108 | width = 160 |
| 109 | print(Style.RESET_ALL) |
| 110 | print(Back.BLACK + Style.BRIGHT + '\n') |
| 111 | for line in lines: |
| 112 | if isinstance(line, str): |
| 113 | if len(line) > width: |
| 114 | line = line[:width] |
| 115 | print('\033[2K' + Fore.LIGHTYELLOW_EX + line) |
| 116 | elif isinstance(line, tuple): |
| 117 | yellow_line = line[0] if len(line) > 0 else '' |
| 118 | white_line = line[1] if len(line) > 1 else '' |
| 119 | if len(yellow_line) > width: |
| 120 | yellow_line = yellow_line[:width] |
| 121 | if len(yellow_line) + len(white_line) > width: |
| 122 | if len(yellow_line) < width: |
| 123 | white_line = white_line[:width - len(yellow_line)] |
| 124 | else: |
| 125 | white_line = '' |
| 126 | print('\033[2K' + Fore.LIGHTYELLOW_EX + yellow_line + Fore.LIGHTWHITE_EX + white_line) |
| 127 | |
| 128 | print('\033[2K' + Fore.LIGHTBLACK_EX + f'{("v" + __version__):>93}' + Style.RESET_ALL) |
| 129 | print() |
| 130 | |
| 131 | |
| 132 | def formatted_records(records, **kwargs): |
nothing calls this directly
no outgoing calls
no test coverage detected