Skip to content

Instantly share code, notes, and snippets.

@VaughnDV
Created May 19, 2017 13:32
Show Gist options
  • Save VaughnDV/6b3959704e6451f6fec231a51f875c91 to your computer and use it in GitHub Desktop.
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
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