/пше
Last active
January 3, 2025 20:56
Revisions
-
piranha revised this gist
Aug 23, 2013 . 1 changed file with 11 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,8 @@ # # This incredible piece of code makes git a bit Polish, a bit Western Ukrainian, # пше прошу пана # Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts # # (c) 2013 Alexander Solovyov under terms of WTFPL import sys @@ -40,9 +40,12 @@ def main(args): if __name__ == '__main__': if len(sys.argv) > 1: sys.exit(main(sys.argv[1:])) print 'Usage: пше цомманд оптионс -> git command options' print '' print 'Пше гіт версіон 0.1' print '' print 'Используйте транслитерированные команды, например:' print ' - пше цоммит -м "инитиал цоммит"' print ' - пше цомміт -м "інітіал цомміт"' print ' - пше лог' print ' - пше пуш' -
piranha revised this gist
Aug 23, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ # # This incredible piece of code makes git a bit Polish, a bit Western Ukrainian, # пше прошу пана # Joke is based on the fact that 'git' is 'пше' in qwerty/йцукен layouts # # (c) 2013 Alexander Solovyov under terms of WTFPL -
piranha revised this gist
Aug 23, 2013 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ # # This incredible piece of code makes git a bit Polish, a bit Western Ukrainian, # пше прошу пана # Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts # # (c) 2013 Alexander Solovyov under terms of WTFPL import sys @@ -36,4 +38,11 @@ def main(args): if __name__ == '__main__': if len(sys.argv) > 1: sys.exit(main(sys.argv[1:])) print 'Usage: пше команда опции' print ' Используйте транслитерированные команды, например:' print ' - пше цоммит -м "инитиал цоммит"' print ' - пше цомміт -м "інітіал цомміт"' print ' - пше лог' print ' - пше пуш' -
piranha revised this gist
Aug 23, 2013 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,13 +6,17 @@ # (c) 2013 Alexander Solovyov under terms of WTFPL import sys from subprocess import call # commit <- цомміт, дамміт :( 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())) table[u'і'] = 'i' table[u'є'] = 'e' table[u'ї'] = 'yi' # їєлд -> yield :-) def transletter(l): @@ -28,8 +32,8 @@ def transliterate(s): def main(args): args = map(transliterate, args) return call(['git'] + args) if __name__ == '__main__': sys.exit(main(sys.argv[1:])) -
piranha created this gist
Aug 23, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/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:])