-
-
Save piranha/6319369 to your computer and use it in GitHub Desktop.
пше гит, прошу пана
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- mode: python, coding: utf-8 -*- | |
# | |
# This incredible piece of code makes git a bit Polish, a bit Western Ukrainian, | |
# пше прошу пана | |
# (c) 2013 Alexander Solovyov under terms of WTFPL | |
import sys | |
from subprocess import check_output | |
table = dict(zip(u'а б в г д е ë ж з и й к л м н о п р с ' | |
u'т у ф х ц ч ш щ ь ы ъ э ю я'.split(), | |
u'a b v g d e e zh z i j k l m n o p r s ' | |
u't u f h c ch sh sch \' y \' e yu ya'.split())) | |
def transletter(l): | |
if l.lower() not in table: | |
return l | |
n = table[l.lower()] | |
return n.upper() if l.isupper() else n | |
def transliterate(s): | |
return ''.join(map(transletter, s.decode('utf-8'))) | |
def main(args): | |
args = map(transliterate, args) | |
print check_output(['git'] + args) | |
if __name__ == '__main__': | |
main(sys.argv[1:]) |
lol
LOL)
Colemak-версия тоже была бы забавной
Мейд май фрайдей :)
+1
цомманд
Как-то не так...
да здравствует Пиранья
кул)
всі про це думали, а тут ВЗЯВ І ЗРОБИВ
содомит
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Haha! This is great! ))