summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/morse/COPYING14
-rw-r--r--util/morse/Makefile3
-rw-r--r--util/morse/README32
-rwxr-xr-xutil/morse/morse.sh160
l---------util/tts/bin/alberto1
l---------util/tts/bin/anjali1
l---------util/tts/bin/arnaud1
l---------util/tts/bin/audrey1
l---------util/tts/bin/charles1
l---------util/tts/bin/claire1
l---------util/tts/bin/crystal1
l---------util/tts/bin/francesca1
l---------util/tts/bin/giovanni1
l---------util/tts/bin/juliette1
l---------util/tts/bin/klara1
l---------util/tts/bin/lauren1
l---------util/tts/bin/mike1
l---------util/tts/bin/reiner1
l---------util/tts/bin/rich1
l---------util/tts/bin/rosa1
-rw-r--r--util/tts/names16
21 files changed, 241 insertions, 0 deletions
diff --git a/util/morse/COPYING b/util/morse/COPYING
new file mode 100644
index 00000000..d28e4178
--- /dev/null
+++ b/util/morse/COPYING
@@ -0,0 +1,14 @@
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 23, December 1984
+
+ Copyright (C) 2011 tv@shackspace
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/util/morse/Makefile b/util/morse/Makefile
new file mode 100644
index 00000000..2afa845e
--- /dev/null
+++ b/util/morse/Makefile
@@ -0,0 +1,3 @@
+.phony: all
+all:
+ ln -fs $$PWD/morse.sh ../bin/morse
diff --git a/util/morse/README b/util/morse/README
new file mode 100644
index 00000000..67951c00
--- /dev/null
+++ b/util/morse/README
@@ -0,0 +1,32 @@
+MORSE(1) MORSE(1)
+
+NAME
+ morse.sh - morse code generator
+
+SYNOPSIS
+ morse [-l N] [-f N] [-c|-x] [text...]
+
+DESCRIPTION
+ Generate visible or audible from text or stdin.
+
+OPTIONS
+ -l N use N milliseconds as length of dit. Default: 60 ms
+
+ -f N beep at N Hz. Default: 2000 Hz
+
+ -c compile only. Morse will output morse-executable morse code.
+
+ -x execute only. Interpret text as morse code, i.e. do not try
+ to convert text or stdin.
+
+BUGS
+ None.^_^
+
+REPORTING BUGS
+ Please use Github's issue tracking system.
+
+AUTHOR
+ This program was written by tv@shackspace and is distributed under the
+ Do What The Fuck You Want To Public License.
+
+ April 2011 MORSE(1)
diff --git a/util/morse/morse.sh b/util/morse/morse.sh
new file mode 100755
index 00000000..c84538ca
--- /dev/null
+++ b/util/morse/morse.sh
@@ -0,0 +1,160 @@
+#! /bin/sh
+set -euf
+
+freq=2000
+dit=60
+mode=compile+execute
+
+## plain stupid options "parser"
+while test $# -gt 0; do
+ case "$1" in
+ (-l) dit=$2; shift 2;;
+ (-f) freq=$2; shift 2;;
+ (-c) mode=compile; shift 1;;
+ (-x) mode=execute; shift 1;;
+ (*) break 2;;
+ esac
+done
+
+# Ein Dah ist dreimal so lang wie ein Dit.
+dah=`echo "$dit * 3" | bc`
+
+## Convert a character to the corresponting morse code.
+## Note: any unknown characters are left unaltered.
+char2morse() {
+tr [a-z] [A-Z] |
+sed '
+ # Die Pause zwischen Wörtern beträgt sieben Dits. (1/2)
+ s:[[:space:]]\+::g
+
+ # Zwischen Buchstaben in einem Wort wird eine Pause von Dah eingeschoben.
+ s:[^ ]:& :g
+
+ # Die Pause zwischen Wörtern beträgt sieben Dits. (2/2)
+ s: : :g
+' |
+sed '
+ # Lateinische Buchstaben
+ # Die Pause zwischen zwei gesendeten Symbolen ist ein Dit lang.
+ s:A:· −:g
+ s:B:− · · ·:g
+ s:C:− · − ·:g
+ s:D:− · ·:g
+ s:E:·:g
+ s:F:· · − ·:g
+ s:G:− − ·:g
+ s:H:· · · ·:g
+ s:I:· ·:g
+ s:J:· − − −:g
+ s:K:− · −:g
+ s:L:· − · ·:g
+ s:M:− −:g
+ s:N:− ·:g
+ s:O:− − −:g
+ s:P:· − − ·:g
+ s:Q:− − · −:g
+ s:R:· − ·:g
+ s:S:· · ·:g
+ s:T:−:g
+ s:U:· · −:g
+ s:V:· · · −:g
+ s:W:· − −:g
+ s:X:− · · −:g
+ s:Y:− · − −:g
+ s:Z:− − · ·:g
+' |
+sed '
+ # Ziffern
+ # Die Pause zwischen zwei gesendeten Symbolen ist ein Dit lang.
+ s:0:− − − − −:g
+ s:1:· − − − −:g
+ s:2:· · − − −:g
+ s:3:· · · − −:g
+ s:4:· · · · −:g
+ s:5:· · · · ·:g
+ s:6:− · · · ·:g
+ s:7:− − · · ·:g
+ s:8:− − − · ·:g
+ s:9:− − − − ·:g
+' |
+sed '
+ # TODO Sonder- und Satzzeichen
+ #s:À, Å:· − − · −
+ #s:Ä:· − · −
+ #s:È:· − · · −
+ #s:É:· · − · ·
+ #s:Ö:− − − ·
+ #s:Ü:· · − −
+ #s:ß:· · · − − · ·
+ #s:CH:− − − −
+ #s:Ñ:− − · − −
+ #s:. (AAA) · − · − · −
+ #s:, (MIM) − − · · − −
+ #s:: − − − · · ·
+ #s:; − · − · − ·
+ #s:? (IMI) · · − − · ·
+ #s:- − · · · · −
+ #s:_ · · − − · −
+ #s:( − · − − ·
+ #s:) − · − − · −
+ #s:'\'' · − − − − ·
+ #s:= − · · · −
+ #s:+ · − · − ·
+ #s:/ − · · − ·
+ #s:@ (AC) · − − · − ·
+' |
+sed '
+ # TODO Signale
+ # KA
+ # (Spruchanfang) − · − · −
+ # BT
+ # (Pause) − · · · −
+ # AR
+ # (Spruchende) · − · − ·
+ # VE
+ # (verstanden) · · · − ·
+ # SK
+ # (Verkehrsende) · · · − · −
+ # SOS
+ # (internationaler
+ # (See-)Notruf) · · · − − − · · ·
+ # HH
+ # (Fehler; Irrung;
+ # Wiederholung
+ # ab letztem
+ # vollständigen Wort) · · · · · · · ·
+'
+}
+
+## Convert morse code to beep(1) arguments.
+morse2beeparg() {
+sed "
+ s: : -n -f 1 -l $dit:g
+ s:·: -n -f $freq -l $dit:g
+ s:−: -n -f $freq -l $dah:g
+" |
+ sed '
+ 1s:^:beep -f 1 -l 1:
+'
+}
+
+compile() {
+ char2morse
+}
+
+execute() {
+ `morse2beeparg`
+}
+
+## main - process either [any non-option] arguments or stdin.
+if test $# -gt 0; then
+ echo "$*"
+else
+ cat
+fi |
+case "$mode" in
+ (compile) compile;;
+ (execute) execute;;
+ (compile+execute) compile | execute;;
+ (*) echo bad mode: $mode >&2; exit 23;;
+esac
diff --git a/util/tts/bin/alberto b/util/tts/bin/alberto
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/alberto
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/anjali b/util/tts/bin/anjali
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/anjali
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/arnaud b/util/tts/bin/arnaud
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/arnaud
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/audrey b/util/tts/bin/audrey
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/audrey
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/charles b/util/tts/bin/charles
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/charles
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/claire b/util/tts/bin/claire
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/claire
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/crystal b/util/tts/bin/crystal
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/crystal
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/francesca b/util/tts/bin/francesca
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/francesca
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/giovanni b/util/tts/bin/giovanni
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/giovanni
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/juliette b/util/tts/bin/juliette
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/juliette
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/klara b/util/tts/bin/klara
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/klara
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/lauren b/util/tts/bin/lauren
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/lauren
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/mike b/util/tts/bin/mike
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/mike
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/reiner b/util/tts/bin/reiner
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/reiner
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/rich b/util/tts/bin/rich
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/rich
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/bin/rosa b/util/tts/bin/rosa
new file mode 120000
index 00000000..6947e393
--- /dev/null
+++ b/util/tts/bin/rosa
@@ -0,0 +1 @@
+../../util/bin/naturalvoices.att \ No newline at end of file
diff --git a/util/tts/names b/util/tts/names
new file mode 100644
index 00000000..576c74e5
--- /dev/null
+++ b/util/tts/names
@@ -0,0 +1,16 @@
+alberto
+anjali
+arnaud
+audrey
+charles
+claire
+crystal
+francesca
+giovanni
+juliette
+klara
+lauren
+mike
+reiner
+rich
+rosa