summaryrefslogtreecommitdiffstats
path: root/util/bin/translate.google
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-03-05 17:16:19 +0100
committerlassulus <lass@aidsballs.de>2015-03-05 17:16:19 +0100
commit67a7a6a6beeae2b36de38c4dd59d4895b6a188bc (patch)
tree6b738851912b66ecd0f5a3097fdb7fb066187be4 /util/bin/translate.google
parent760428adcfe08b4c66207f79fcfab02ff6d5be33 (diff)
utils: normalize naming of google wrappers
Diffstat (limited to 'util/bin/translate.google')
-rwxr-xr-xutil/bin/translate.google27
1 files changed, 0 insertions, 27 deletions
diff --git a/util/bin/translate.google b/util/bin/translate.google
deleted file mode 100755
index 06c6a5a8..00000000
--- a/util/bin/translate.google
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-set -euf
-
-sl=${SL:="auto"}
-tl=${TL:="en"}
-
-usage(){
- echo 'TL= targetlanguage, valid strings are in the style of "en", "pl" or "de". default "en"'
- echo 'SL= sourcelanguage, same TL, default is auto'
- echo 'Example: TL="de" ./translate.google "whats up?"'
-
- exit 0
-}
-
-translate(){
- text=$*
- url="http://translate.google.com/translate_a/t?client=t&sl=$sl&tl=$tl"
- curl -A "Mozilla/5.0" -Ss "$url" --data-urlencode "text=$text" |
- sed 's/\[\[\[\"//' |
- cut -d \" -f 1
-}
-
-if [ $# -eq 0 ]; then
- usage
-fi
-
-translate $*