diff options
Diffstat (limited to 'util/bin')
-rwxr-xr-x | util/bin/galileo | 3 | ||||
-rwxr-xr-x | util/bin/google.currency | 2 | ||||
-rwxr-xr-x | util/bin/google.text2speech | 1 | ||||
-rwxr-xr-x | util/bin/google.translate | 1 | ||||
-rwxr-xr-x | util/bin/paste | 26 | ||||
-rwxr-xr-x | util/bin/pigbin | 5 | ||||
-rwxr-xr-x | util/bin/untilport | 15 | ||||
-rwxr-xr-x | util/bin/urgent | 2 |
8 files changed, 46 insertions, 9 deletions
diff --git a/util/bin/galileo b/util/bin/galileo deleted file mode 100755 index 854f1302..00000000 --- a/util/bin/galileo +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -export voice=klara -./wiki.firstpar http://de.m.wikipedia.org/wiki/::Random | xargs ./naturalvoices.att diff --git a/util/bin/google.currency b/util/bin/google.currency index 8219a866..8a3f708f 100755 --- a/util/bin/google.currency +++ b/util/bin/google.currency @@ -6,7 +6,7 @@ sc=${SC:="eur"} usage(){ echo 'TC= targetcurrency, valid strings are in the style of "usd", "eur" or "sgd". default "usd"' - echo 'SC= sourcecurrency, same TC, default is eur' + echo 'SC= sourcecurrency, same as TC, default is eur' echo 'Example: TC="sgd" ./currency.google 11' exit 0 diff --git a/util/bin/google.text2speech b/util/bin/google.text2speech index 061bb1c8..cd387cc0 100755 --- a/util/bin/google.text2speech +++ b/util/bin/google.text2speech @@ -5,6 +5,7 @@ TL=${TL:="en"} usage(){ echo 'TL= can specifiy which language to use, default is "en"' + echo 'valid languages: https://cloud.google.com/translate/v2/using_rest#language-params' echo 'Example: TL="de" ./text2speech.google "whats up?" | mpv -' exit 0 } diff --git a/util/bin/google.translate b/util/bin/google.translate index 06c6a5a8..a8ccd8cc 100755 --- a/util/bin/google.translate +++ b/util/bin/google.translate @@ -7,6 +7,7 @@ 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 'valid languages: https://cloud.google.com/translate/v2/using_rest#language-params' echo 'Example: TL="de" ./translate.google "whats up?"' exit 0 diff --git a/util/bin/paste b/util/bin/paste new file mode 100755 index 00000000..b7cc6c99 --- /dev/null +++ b/util/bin/paste @@ -0,0 +1,26 @@ +#!/bin/sh +set -euf + +usage() { + echo 'paste reads from stdin and pastes to the specified paste service' + echo 'currently ix.io and paste.retiolum are supported' + echo 'default is paste.retiolum' + echo 'ex:' + echo 'cat somefile | paste ix.io' +} + +hoster=${1:-paste.retiolum} + +case $hoster in + paste.retiolum|paste) + curl -sS -F 'file=@-;type=text/plain' \ + http://paste.retiolum:5000/+upload \ + | sed -n 's|.*href="\([^#]*\).*|http://paste.retiolum\1\n|p' + ;; + ix.io) + curl -sS -F 'f:1=<-' ix.io + ;; + *) + usage + ;; +esac diff --git a/util/bin/pigbin b/util/bin/pigbin deleted file mode 100755 index ae0b270f..00000000 --- a/util/bin/pigbin +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -#usage: -#echo aidsballs | pigbin - -curl -F 'p=<-' paste diff --git a/util/bin/untilport b/util/bin/untilport new file mode 100755 index 00000000..b815cb19 --- /dev/null +++ b/util/bin/untilport @@ -0,0 +1,15 @@ +#!/bin/sh +set -euf + +usage() { + echo 'untiport $target $port' + echo 'Sleeps until the destinated port is reachable.' + echo 'ex: untilport google.de 80 && echo 'google is now reachable'' +} + +if [ $# -ne 2 ]; then + usage +else + until nc -z "$@"; do sleep 1; done +fi + diff --git a/util/bin/urgent b/util/bin/urgent new file mode 100755 index 00000000..33593551 --- /dev/null +++ b/util/bin/urgent @@ -0,0 +1,2 @@ +#!/bin/sh +printf '\a' |