annotate bin/unidecode @ 6223:fb412a31386c
<tswett> echo \'words ${1---eng-1M --esolangs 20} | sed -re \'\\\'\'s/( |$)/lang\\1/g\'\\\' > bin/langs
author |
HackBot |
date |
Thu, 19 Nov 2015 01:51:15 +0000 |
parents |
56dcce63901b |
children |
c3351169a617 |
rev |
line source |
5643
|
1 #!/usr/bin/env python
|
|
2 import os, sys
|
|
3 import unicodedata
|
|
4 s = u" ".join("[U+{0:04X} {1}]".format(ord(c), unicodedata.name(c, "DUNNO")) for c in " ".join(sys.argv[1:]).decode("utf-8")).encode("utf-8")
|
|
5 if u"DUNNO" in s:
|
|
6 os.execvp("multicode", ["multicode"] + sys.argv[1:])
|
|
7 else:
|
|
8 print s
|