+bin/urlencode
This commit is contained in:
parent
0651c6e3a4
commit
c9f13d2eca
7
bin/urlencode
Executable file
7
bin/urlencode
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
import os, sys, urllib
|
||||||
|
if os.isatty(file.fileno(sys.stdin)):
|
||||||
|
text = sys.argv[1]
|
||||||
|
else:
|
||||||
|
text = "".join(sys.stdin.readlines())
|
||||||
|
print(urllib.quote_plus(text.strip()))
|
Loading…
Reference in a new issue