wasi-master/gradient_figlet

[FEAT]: Use within python scripts not just terminal...

XMVZ opened this issue · 2 comments

XMVZ commented

Description

hi

i am new to coding and am dying to use this to have a pyfiglet turned into one of your beautiful gradients when printed...
however, i have no idea how to implement your repo into script format - i only see documentation for terminal commands.

please let me know <3

Additional Information

No response

I have released a new version (0.5.0) that allows you to use the library as a script, to update the library use the command

python -m pip install -U gradient-figlet

and to use the library use

from gradient_figlet import print_with_gradient_figlet

text = "hello"
font = "slant"
color_1 = "red"
color_2 = "green"

print_with_gradient_figlet(text, font, color_1, color_2)

the print_with_gradient_figlet function takes a lot of parameters but for a basic example, you only need to use the first 4. The first one is the text, the second one is the font, and the third and fourth ones are the colors

for a list of good colors and a list of good fonts you can take a look at the pleasing_items.py file

XMVZ commented

Wow, you are truly a legend... THANK YOU. SO MUCH! <3