-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (25 loc) · 904 Bytes
/
main.py
File metadata and controls
32 lines (25 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pyfiglet
import argparse
from colorama import Fore, Style, init
init(autoreset=True)
COLORS = {
"red": Fore.RED,
"green": Fore.GREEN,
"blue": Fore.BLUE,
"yellow": Fore.YELLOW,
"cyan": Fore.CYAN,
"magenta": Fore.MAGENTA,
"white": Fore.WHITE
}
def generate_ascii(text, font):
figlet = pyfiglet.Figlet(font=font)
return figlet.renderText(text)
def main():
parser = argparse.ArgumentParser(
description="🔥 ASCII Art Generator - Terminal Edition"
)
parser.add_argument("text", nargs="?", help="Text to convert into ASCII")
parser.add_argument("--font", default="standard", help="ASCII font name")
parser.add_argument("--color", choices=COLORS.keys(), help="Text color")
parser.add_argument("--list-fonts", action="store_true", help="List all available fonts")
parser.add_argument("--save", help="Save output to a file")