summaryrefslogtreecommitdiffstats
path: root/noise/modules/lang
diff options
context:
space:
mode:
authortv <tv@also>2011-05-29 15:47:21 +0200
committertv <tv@also>2011-05-29 15:47:21 +0200
commit12c77cdbfa4ec48d935af3ae7cf1118e38bec6e1 (patch)
tree2fdf8b557d2a2a1edaba2be569c2110c3822559f /noise/modules/lang
parentedaa1d7f7a0ed33c019fce185b8aff7563498b6e (diff)
lowered filesystem hierarchy--everything are modules
Diffstat (limited to 'noise/modules/lang')
-rwxr-xr-xnoise/modules/lang22
1 files changed, 22 insertions, 0 deletions
diff --git a/noise/modules/lang b/noise/modules/lang
new file mode 100755
index 00000000..07b6802e
--- /dev/null
+++ b/noise/modules/lang
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+case "$1" in
+ (--help)
+ echo "set language or list available languages" ;;
+ (list)
+ espeak --voices | sed -n '1!p' | awk '{\
+ printf"/lang %s set lang to %s\n",$2,$4
+ }' ;;
+ ('')
+ echo /set lang >$NOISE_linefeed ;;
+ (*)
+ if test -z "$2" ; then
+ echo /set lang "$1"
+ else
+ echo /set lang "$1"
+ shift
+ echo "$*"
+ echo /set lang "${noise_lang-de}"
+ fi >$NOISE_linefeed
+esac
+