Created
October 7, 2012 12:53
-
-
Save gtklocker/3848312 to your computer and use it in GitHub Desktop.
Minimal Greek to Greeklish converter (capital letters only)
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
# coding: utf-8 | |
import sys | |
alphabet = { | |
'Α': 'A', | |
'Β': 'B', | |
'Γ': 'G', | |
'Δ': 'D', | |
'Ε': 'E', | |
'Ζ': 'Z', | |
'Η': 'E', | |
'Θ': 'TH', | |
'Ι': 'I', | |
'Κ': 'K', | |
'Λ': 'L', | |
'Μ': 'M', | |
'Ν': 'N', | |
'Ξ': 'X', | |
'Ο': 'O', | |
'Π': 'P', | |
'Ρ': 'R', | |
'Σ': 'S', | |
'Τ': 'T', | |
'Υ': 'U', | |
'Φ': 'PH', | |
'Χ': 'CH', | |
'Ψ': 'PS', | |
'Ω': 'O' | |
} | |
for name in sys.argv[ 1: ]: | |
print( ''.join( list( map( lambda ltr: alphabet[ ltr ], name ) ) ) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment