import random
from pyfiglet import Figlet
from termcolor import colored
TEXT = "Happy New Year 2025"
COLOR_LIST = ['red', 'green', 'blue', 'yellow']
with open('texts.txt') as f:
font_list = [line.strip() for line in f]
figlet = Figlet()
for _ in range(1):
random_font = random.choice(font_list)
random_color = random.choice(COLOR_LIST)
figlet.setFont(font=random_font)
text_art = colored(figlet.renderText(TEXT), random_color)
print("\n", text_art)
#source code --> clcoding.com
0 Comments:
Post a Comment