Created
May 19, 2017 13:32
-
-
Save VaughnDV/6b3959704e6451f6fec231a51f875c91 to your computer and use it in GitHub Desktop.
Print labels that can be read from the sublime text editor miniature side view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
# Print Lables or Banners one word at a time that can be cut and pasted into python code | |
# Can be read from the sublime text editor miniature side view | |
# example use: python.printer.py BANNER | |
def printer(string): | |
string=string.lower() | |
for i in range(1,7): | |
for letter in string: | |
for key in alphabet: | |
if letter == key: | |
print (alphabet[letter][i], end='#') | |
print ('#') | |
alphabet= { | |
'a':[ | |
'#########', | |
'#### ####', | |
'### # ###', | |
'## ### ##', | |
'# #', | |
'# ##### #', | |
'#########' | |
], | |
'b':[ | |
'#######', | |
'# ##', | |
'# ## #', | |
'# ###', | |
'# ## #', | |
'# ##', | |
'#######' | |
], | |
'c':[ | |
'########', | |
'### ###', | |
'## ### #', | |
'# ######', | |
'## ### #', | |
'### ##', | |
'########' | |
], | |
'd':[ | |
'########', | |
'# ####', | |
'# ### ##', | |
'# #### #', | |
'# ### ##', | |
'# ####', | |
'########' | |
], | |
'e':[ | |
'#######', | |
'# #', | |
'# #####', | |
'# ###', | |
'# #####', | |
'# #', | |
'#######' | |
], | |
'f':[ | |
'#######', | |
'# #', | |
'# #####', | |
'# ###', | |
'# #####', | |
'# #####', | |
'#######' | |
], | |
'g':[ | |
'########', | |
'## ##', | |
'# ######', | |
'# # #', | |
'# ### ##', | |
'## ##', | |
'########' | |
], | |
'h':[ | |
'#######', | |
'# ### #', | |
'# ### #', | |
'# #', | |
'# ### #', | |
'# ### #', | |
'#######' | |
], | |
'i':[ | |
'#######', | |
'# #', | |
'### ###', | |
'### ###', | |
'### ###', | |
'# #', | |
'#######' | |
], | |
'j':[ | |
'########', | |
'## #', | |
'#### ###', | |
'#### ###', | |
'#### ###', | |
'# ####', | |
'########' | |
], | |
'k':[ | |
'######', | |
'# ## #', | |
'# # ##', | |
'# ###', | |
'# # ##', | |
'# ## #', | |
'######' | |
], | |
'l':[ | |
'#######', | |
'# #####', | |
'# #####', | |
'# #####', | |
'# #####', | |
'# #', | |
'#######' | |
], | |
'm':[ | |
'#########', | |
'# ##### #', | |
'# ### #', | |
'# # # # #', | |
'# ## ## #', | |
'# ##### #', | |
'#########' | |
], | |
'n':[ | |
'#########', | |
'# ##### #', | |
'# # ### #', | |
'# ## ## #', | |
'# ### # #', | |
'# #### #', | |
'#########' | |
], | |
'o':[ | |
'#########', | |
'### ###', | |
'## ### ##', | |
'# ##### #', | |
'## ### ##', | |
'### ###', | |
'#########' | |
], | |
'p':[ | |
'#######', | |
'# ##', | |
'# ### #', | |
'# ##', | |
'# #####', | |
'# #####', | |
'#######' | |
], | |
'q':[ | |
'#########', | |
'### ###', | |
'## ### ##', | |
'# ## ## #', | |
'## ## ##', | |
'### # #', | |
'#########' | |
], | |
'r':[ | |
'#######', | |
'# ##', | |
'# ### #', | |
'# ##', | |
'# ### #', | |
'# ### #', | |
'#######' | |
], | |
's':[ | |
'#######', | |
'## #', | |
'# #####', | |
'## ###', | |
'#### #', | |
'# ##', | |
'#######' | |
], | |
't':[ | |
'#########', | |
'# #', | |
'#### ####', | |
'#### ####', | |
'#### ####', | |
'#### ####', | |
'#########' | |
], | |
'u':[ | |
'#########', | |
'# ##### #', | |
'# ##### #', | |
'# ##### #', | |
'## #### #', | |
'### #', | |
'#########' | |
], | |
'v':[ | |
'#########', | |
'# ##### #', | |
'# ##### #', | |
'## ### ##', | |
'### # ###', | |
'#### ####', | |
'#########' | |
], | |
'w':[ | |
'###########', | |
'# ####### #', | |
'# ####### #', | |
'# ### ### #', | |
'## ## ## ##', | |
'### ### ###', | |
'###########' | |
], | |
'x':[ | |
'########', | |
'# #### #', | |
'## ## ##', | |
'### ####', | |
'## ## ##', | |
'# #### #', | |
'########' | |
], | |
'y':[ | |
'#########', | |
'# ##### #', | |
'# ### #', | |
'### # ###', | |
'#### ####', | |
'#### ####', | |
'#########' | |
], | |
'z':[ | |
'#########', | |
'# #', | |
'####### #', | |
'##### ###', | |
'### #####', | |
'# #', | |
'#########' | |
], | |
' ' :[ | |
'###########', | |
'###########', | |
'###########', | |
'###########', | |
'###########', | |
'###########', | |
'###########' | |
]} | |
printer(sys.argv[1]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment