MCPcopy Create free account
hub / github.com/JaveleyQAQ/WeChatOpenDevTools-Python / generate_banner

Function generate_banner

utils/banner.py:8–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 print(f"{color_code}{text}"+Color.END)
7
8def generate_banner():
9 name="""
10
11
12 公众号: 一位不愿透露姓名的热心网友
13 Github:https://github.com/JaveleyQAQ
14 """
15 selected_fonts = ['standard', 'big', 'slant', 'small', 'shadow']
16 selected_font = random.choice(selected_fonts)
17 font = pyfiglet.Figlet(font=selected_font)
18 ascii_banner = font.renderText("WX DevTools")
19 color_codes = [Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW, Color.CYAN, Color.PURPLE]
20 selected_color = random.choice(color_codes)
21 ascii_banner_with_author = ascii_banner.rstrip('\r\n') + f'\n\n\t'+name+f'\n'
22 colored_print(ascii_banner_with_author, selected_color)

Callers 1

main.pyFile · 0.90

Calls 1

colored_printFunction · 0.85

Tested by

no test coverage detected