mirror of
https://github.com/msikma/pokesprite.git
synced 2026-09-10 11:25:10 -05:00
Remove old scripts, add a few helper scripts in Bash for compatibility
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# prints JSON-usable japanese
|
||||
# example: $ ./jsonjp.py モクロー
|
||||
# output: "\u30e2\u30af\u30ed\u30fc"
|
||||
# Prints input with non-ASCII characters converted to Unicode escape sequences.
|
||||
# Example:
|
||||
# $ ./jsonjp.py モクロー
|
||||
# "\u30e2\u30af\u30ed\u30fc"
|
||||
|
||||
import json
|
||||
import sys
|
||||
print(json.dumps(sys.argv[1]))
|
||||
if len(sys.argv) <= 1:
|
||||
print('usage: jsonjp.py TEXT')
|
||||
sys.exit(1)
|
||||
print(json.dumps(sys.argv[1]))
|
||||
|
||||
Reference in New Issue
Block a user