first commit

This commit is contained in:
2026-05-26 19:25:02 +09:00
commit 972392a192
5 changed files with 131 additions and 0 deletions

16
trk Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# trk — translate English↔Korean, direction picked from input.
if [ $# -gt 0 ]; then
text=$*
else
text=$(cat)
fi
if printf '%s' "$text" | grep -qP '[\x{AC00}-\x{D7A3}\x{3131}-\x{3163}]'; then
pair=ko:en
else
pair=en:ko
fi
exec trans -b "$pair" "$text"