forked from tiagoamemiya/aleksay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaleksay.py
More file actions
executable file
·54 lines (47 loc) · 1.06 KB
/
aleksay.py
File metadata and controls
executable file
·54 lines (47 loc) · 1.06 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/python
# encoding: utf-8
import random, sys
header_line="|||||||||||||| ALEKSAY ||||||||||||||"
quotes=open("messages.txt").read().split("\n")
# Alek
def alek():
ballon="___________ __________"
ballon_footer="\/"
ballon='{s:{c}^{n}}'.format(s=ballon,n=len(header_line),c=' ')
print(ballon)
ballon_footer='{s:{c}^{n}}'.format(s=ballon_footer,n=len(header_line),c=' ')
print(ballon_footer)
print ("""
|\\\\\\\\\\\\\\ !
|| )
|| ~~ ~~
(5 - |-|
|| J |
|| /\\\\\\\\ ||
||||||||| ||
|__ | | ]]]
__ /__/\/_\__ | / )
/ \\ / /
""")
# frase por parâmetro
def quote():
q=sys.argv[1:]
if len(q) > 0:
print(" ".join(q).center( len(header_line) , " " ))
else:
print_random_quote()
# frase randomica
def print_random_quote():
quote=random.choice(quotes)
quote='{s:{c}^{n}}'.format(s=quote,n=len(header_line),c=' ')
print(quote)
# main
def main():
print("")
quote()
alek()
print(header_line)
print("")
# main
if __name__ == "__main__":
main()