Created
May 24, 2015 21:18
-
-
Save stylemistake/9ad23bf2e0e6a2e38951 to your computer and use it in GitHub Desktop.
Convert text to emoji-letters!
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
#!/bin/bash | |
## -------------------------------------------------------- | |
## Textmoji v0.1 | |
## Style Mistake <stylemistake@gmail.com> | |
## -------------------------------------------------------- | |
declare -A charmap | |
eof=`echo -en '\x04'` | |
charmap['a']='\U1f1e6' | |
charmap['b']='\U1f1e7' | |
charmap['c']='\U1f1e8' | |
charmap['d']='\U1f1e9' | |
charmap['e']='\U1f1ea' | |
charmap['f']='\U1f1eb' | |
charmap['g']='\U1f1ec' | |
charmap['h']='\U1f1ed' | |
charmap['i']='\U1f1ee' | |
charmap['j']='\U1f1ef' | |
charmap['k']='\U1f1f0' | |
charmap['l']='\U1f1f1' | |
charmap['m']='\U1f1f2' | |
charmap['n']='\U1f1f3' | |
charmap['o']='\U1f1f4' | |
charmap['p']='\U1f1f5' | |
charmap['q']='\U1f1f6' | |
charmap['r']='\U1f1f7' | |
charmap['s']='\U1f1f8' | |
charmap['t']='\U1f1f9' | |
charmap['u']='\U1f1fa' | |
charmap['v']='\U1f1fb' | |
charmap['w']='\U1f1fc' | |
charmap['x']='\U1f1fd' | |
charmap['y']='\U1f1fe' | |
charmap['z']='\U1f1ff' | |
while read -sn1 char; do | |
if [ "${char}" = "${eof}" ]; then | |
break | |
elif [ "${char}" = "" ]; then | |
echo | |
else | |
echo -en "${charmap[$char]} " | |
fi | |
done | |
echo | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment