I would like to add an easter egg to one our developers' command line tools, which will greet its user if a certain date is matched. Basically, I'm looking for:
>>> print big_text("Happy\nBirthday")
. _________ _...._ _________ _...._
.'| \ |.' '-. \ |.' '-. .-. .-
< | \ .'```'. '.\ .'```'. '.\ \ / /
| | __ \ | \ \\ | \ \\ \ / /
| | .'''-. .:--.'. | | | | | | | | \ \ / /
| |/.'''. \ / | \ | | \ / . | \ / . \ \ / /
| / | | `" __ | | | |\`'-.-' .' | |\`'-.-' .' \ ` /
| | | | .'.''| | | | '-....-'` | | '-....-'` \ /
| | | | / / | |_ .' '. .' '. / /
| '. | '.\ \._,\ '/'-----------' '-----------' |`-' /
'---' '---'`--' `" _______ '..'
/| .--. . \ ___ `'.
|| |__| .'| ' |--.\ \ .-. .-
|| .--..-,.--. .| < | | | \ ' \ \ / /
|| __ | || .-. | .' |_ | | | | | ' __ \ \ / /
||/'__ '. | || | | | .' || | .'''-. | | | | .:--.'. \ \ / /
|:/` '. '| || | | |'--. .-'| |/.'''. \ | | ' .'/ | \ | \ \ / /
|| | || || | '- | | | / | | | |___.' /' `" __ | | \ ` /
||\ / '|__|| | | | | | | |/_______.'/ .'.''| | \ /
|/\'..' / | | | '.'| | | |\_______|/ / / | |_ / /
' `'-'` |_| | / | '. | '. \ \._,\ '/|`-' /
`'-' '---' '---' `--' `" '..'
Is there a package for that?
Credit where credit is due.
Author of the TAAG app you linked here. Most of the fonts in TAAG are FIGlet fonts (figlet.org). FIGlet is a command line linux app, but FIGlet drivers have been written in several languages. I released the driver I wrote in JavaScript here:
https://github.com/patorjk/figlet.js
Though that would need to be ported to Python to work. I did a search for FIGlet Python libraries and found this:
https://github.com/pwaller/pyfiglet
I'm not sure how well it works, or how much of the spec it implements, but it looks pretty complete.
I think this question is a bit off topic for Stack Overflow, but you can try to google "ASCII art Python" and get things like: http://www.youtube.com/watch?v=NEWuZfTNoJE
OR you can try to do it yourself, here's an outline:
rows = 13 # Maximum height of character
# 0 is a , 1 is b and so on...
alphabeth = [[
r''' ''',
r''' ''',
r''' ''',
r''' ''',
r''' ''',
r''' __ ''',
r''' .:--.'. ''',
r'''/ | \ | ''',
r'''`" __ | | ''',
r''' .'.''| | ''',
r'''/ / | |_ ''',
r'''\ \._,\ '/ ''',
r''' `--' `" ''']]
text = raw_input('Enter text:\n')
c = map(lambda x: ord(x)-ord('a'),text)
for i in range(rows):
for j in c:
print alphabeth[j][i],
print ""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With