Skip to content

Instantly share code, notes, and snippets.

@gtklocker
Created October 7, 2012 12:53
Show Gist options
  • Save gtklocker/3848312 to your computer and use it in GitHub Desktop.
Save gtklocker/3848312 to your computer and use it in GitHub Desktop.
Minimal Greek to Greeklish converter (capital letters only)
# 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