summaryrefslogtreecommitdiffstats
path: root/noise/modules
diff options
context:
space:
mode:
Diffstat (limited to 'noise/modules')
-rwxr-xr-xnoise/modules/cat14
-rwxr-xr-xnoise/modules/chat33
-rwxr-xr-xnoise/modules/date6
-rwxr-xr-xnoise/modules/echo6
-rwxr-xr-xnoise/modules/ein_mal_eins37
-rwxr-xr-xnoise/modules/espeak34
-rwxr-xr-xnoise/modules/help24
-rwxr-xr-xnoise/modules/join15
-rwxr-xr-xnoise/modules/lang22
l---------noise/modules/licht1
-rwxr-xr-xnoise/modules/mpc14
-rwxr-xr-xnoise/modules/names22
-rwxr-xr-xnoise/modules/nick10
-rwxr-xr-xnoise/modules/overlord14
-rwxr-xr-xnoise/modules/part15
-rwxr-xr-xnoise/modules/ping24
-rwxr-xr-xnoise/modules/play36
-rwxr-xr-xnoise/modules/pong26
-rwxr-xr-xnoise/modules/query23
-rwxr-xr-xnoise/modules/send_to_channel17
-rwxr-xr-xnoise/modules/sendmail55
-rwxr-xr-xnoise/modules/shackstatus104
-rwxr-xr-xnoise/modules/sleep10
-rwxr-xr-xnoise/modules/stream2
-rwxr-xr-xnoise/modules/temp50
-rwxr-xr-xnoise/modules/test13
-rwxr-xr-xnoise/modules/twitter125
-rwxr-xr-xnoise/modules/vvs17
-rwxr-xr-xnoise/modules/wall8
-rwxr-xr-xnoise/modules/zeit19
30 files changed, 0 insertions, 796 deletions
diff --git a/noise/modules/cat b/noise/modules/cat
deleted file mode 100755
index e090acba..00000000
--- a/noise/modules/cat
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-case "$1" in
- (--help) : ;;
- (*)
- while read line ; do
- case "$line" in
- (/quit)
- break 2
- ;;
- (*)
- echo "[$line]"
- esac
- done
-esac
diff --git a/noise/modules/chat b/noise/modules/chat
deleted file mode 100755
index e5badc36..00000000
--- a/noise/modules/chat
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo send text to everyone with @@ prepended ;;
- (/nick)
- echo set nick to $2
- echo /set chat_nick $2 >$NOISE_linefeed;;
- (/names)
- cd /tmp/noise
- . $NOISE_pid/environment
- nick="${chat_nick-$NOISE_pid}"
- channel="$chat_channel"
- echo "Users in channel $channel"
- for client in * ; do
- . $client/environment
- chat_nick="${chat_nick-$client}"
- if test "$channel" = "$chat_channel" && test "$default_command" = chat ; then
- echo "$chat_nick"
- fi
- unset chat_nick
- unset chat_channel
- unset default_command
- done ;;
- (*)
- cd /tmp/noise
- . $NOISE_pid/environment
- nick="${chat_nick-$NOISE_pid}"
-
- echo "/send_to_channel $chat_channel $nick: $*" > $NOISE_linefeed
-
-
- #echo /wall @@ $* >$NOISE_linefeed
-esac
diff --git a/noise/modules/date b/noise/modules/date
deleted file mode 100755
index 8cd1b0c1..00000000
--- a/noise/modules/date
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-case "$1" in
- (--help) : ;;
- (*)
- date --rfc-3339=s
-esac
diff --git a/noise/modules/echo b/noise/modules/echo
deleted file mode 100755
index 344dd963..00000000
--- a/noise/modules/echo
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-case "$1" in
- (--help) : ;;
- (*)
- echo "$*"
-esac
diff --git a/noise/modules/ein_mal_eins b/noise/modules/ein_mal_eins
deleted file mode 100755
index e21612a5..00000000
--- a/noise/modules/ein_mal_eins
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/bash
-
-R() {
- echo "`od -t d -N 1 /dev/urandom | sed -n '1s/^[0-9]\+ \+//p'` % $@" | bc
-}
-
-
-
-
-case "$1" in
- (--help) echo Stellt eine einfache Aufgabe ;;
- (*)
- a="`R 69`"
- b="`R 69`"
- op="`echo "\
-Was ist, A hoch B
-Was ist, A plus B
-Was ist, A minus B
-Was ist, A mal B
-Was ist, sinus von 0
-Was ist, Pi halbe mal 2
-Was ist, 2 hoch 8
-Was ist, 2 hoch 16
-Was ist, 2 hoch 32
-Was ist, 42 geteilt durch Pi mal 100
-Was ist, l n von 1
-Was ist, 42
-Was ist, 23
-Starte den Server neu
-Löte ein Kabel an einen Kompjuter
-Was ist, A geteilt durch B"`"
- o="$(R `echo "$op" | wc -l` + 1)"
-
- aufgabe=`echo "$op" | sed -n "$o{s/A/$a/;s/B/$b/;p}"`
-
- echo "/espeak -v Löse die Aufgabe: $aufgabe?" >$NOISE_linefeed
-esac
diff --git a/noise/modules/espeak b/noise/modules/espeak
deleted file mode 100755
index 815d9d99..00000000
--- a/noise/modules/espeak
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-
-print_var() {
- echo "$1 = $2"
-}
-
-speak() {
- p="${noise_pitch-100}"
- v="${noise_lang-de}"
- k="${noise_capital-0}"
- a="${noise_amplitude-600}"
- g="${noise_gap-1}"
- if test "$debug" = true; then
- print_var pitch $p
- print_var lang $v
- print_var capital $k
- print_var amplitude $a
- print_var gap $g
- fi
- if test "$verbose" = true; then
- echo "espeak: $@"
- fi
- #echo "espeak -p \"$pitch\" -v \"$lang\" \"$*\"" >&2
- (espeak --stdout -a $a -k $k -p $p -v $v -g $g | aplay)<<EOF
-$*
-EOF
-}
-
-case "$1" in
- (--help) echo say something with espeak ;;
- (-d|--debug) shift; debug=true speak "$@";;
- (-v|--verbose) shift; verbose=true speak "$@";;
- (*) speak "$@";;
-esac
diff --git a/noise/modules/help b/noise/modules/help
deleted file mode 100755
index 0763f3a0..00000000
--- a/noise/modules/help
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-case "$1" in
- (-*) : ;; # ignore all options
- ('') { for directory in `echo "$NOISE_PATH" | tr : \ ` ; do
- for module in "$directory"/* ; do
- echo `basename "$module"` `$module --help`
- done 2>/dev/null
- done
- ## print all documented built-in commands
- sed -n 's:^noise_\([a-z]\+\)() { # \(.\+\)\?$:\1 \2:p' "$NOISE"
- } | sort | uniq | sed -n '
- $s/$//
- s:^\([a-z]\+\) \(.\+\):type /\1 to \2:p' ;;
- (*)
- ## call
- for directory in `echo "$NOISE_PATH" | tr : \ ` ; do
- for module in "$directory/$1" ; do
- if test -e $module ; then
- shift
- exec $module --help --verbose "$@" 2>&1
- fi
- done
- done
-esac
diff --git a/noise/modules/join b/noise/modules/join
deleted file mode 100755
index 68afcb66..00000000
--- a/noise/modules/join
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo set default_command to chat and join channel ;;
- (*)
- . /tmp/noise/$NOISE_pid/environment
- nick="${chat_nick-$NOISE_pid}"
- echo /send_to_channel "${1-#23}" "$nick" joined the channel >$NOISE_linefeed
- echo /set default_command chat >$NOISE_linefeed
- echo /set chat_channel "${1-#23}" >$NOISE_linefeed
- echo " joined channel ${1-#23}"
- echo /part to go back to espeak ;;
-
-
-esac
diff --git a/noise/modules/lang b/noise/modules/lang
deleted file mode 100755
index 07b6802e..00000000
--- a/noise/modules/lang
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /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
-
diff --git a/noise/modules/licht b/noise/modules/licht
deleted file mode 120000
index 7f170fe2..00000000
--- a/noise/modules/licht
+++ /dev/null
@@ -1 +0,0 @@
-/krebs/god/licht \ No newline at end of file
diff --git a/noise/modules/mpc b/noise/modules/mpc
deleted file mode 100755
index 20abf19b..00000000
--- a/noise/modules/mpc
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help)
- case "$2" in
- (--verbose) mpc --help ;;
- (*) echo access mpd
- esac ;;
- (*)
- ##echo test-module called with following arguments: "$@"
- ## send command for re-evaluation:
- ##echo /espeak test >$NOISE_linefeed
- MPD_HOST=filebitch.shack mpc $@
-esac
diff --git a/noise/modules/names b/noise/modules/names
deleted file mode 100755
index f5922064..00000000
--- a/noise/modules/names
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo send text to everyone with @@ prepended ;;
- (*)
- cd /tmp/noise
- . $NOISE_pid/environment
- if test "$default_command" != chat ; then exit ; fi
- nick="${chat_nick-$NOISE_pid}"
- channel="${1-$chat_channel}"
- echo "Users in channel $channel"
- for client in * ; do
- . $client/environment
- chat_nick="${chat_nick-$client}"
- if test "$channel" = "$chat_channel" && test "$default_command" = chat ; then
- echo "$chat_nick"
- fi
- unset chat_nick
- unset chat_channel
- unset default_command
- done
-esac
diff --git a/noise/modules/nick b/noise/modules/nick
deleted file mode 100755
index 5ed1e9d9..00000000
--- a/noise/modules/nick
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo send text to everyone with @@ prepended ;;
- (*)
- . /tmp/noise/$NOISE_pid/environment
- nick="${chat_nick-$NOISE_pid}"
- echo /send_to_channel $chat_channel $nick is now known as $1 > $NOISE_linefeed
- echo /set chat_nick $1 >$NOISE_linefeed;;
-esac
diff --git a/noise/modules/overlord b/noise/modules/overlord
deleted file mode 100755
index ded8627a..00000000
--- a/noise/modules/overlord
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-set -euf
-
-# cd //
-cd $(dirname $(readlink -f $0))/../..
-
-case "${1---help}" in
- --help)
- echo "Make an announcement! Usage: /overlord <text>"
- ;;
- *)
- exec god/overlord/index "$@"
- ;;
-esac
diff --git a/noise/modules/part b/noise/modules/part
deleted file mode 100755
index d35ac501..00000000
--- a/noise/modules/part
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo leave chat mode ;;
- (*)
- . /tmp/noise/$NOISE_pid/environment
- nick="${chat_nick-$NOISE_pid}"
-
- echo "/send_to_channel $chat_channel $nick has quit ${*-no reason}" > $NOISE_linefeed
-
- echo /set default_command espeak >$NOISE_linefeed
- echo "disabled chat mode (set back to espeak)" ;;
-
-
-esac
diff --git a/noise/modules/ping b/noise/modules/ping
deleted file mode 100755
index acf2529f..00000000
--- a/noise/modules/ping
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-cd /tmp/noise
-case "$1" in
- (--help) : ;;
- ('')
- . $NOISE_pid/environment
- ping_timestamp=${ping_timestamp-0}
- ping_challenger=${ping_challenger-0}
- if test $ping_challenger != 0 ; then
- echo There is already a ping challange running
- else
- timestamp=`date +%s%N`
- for client in * ; do
- echo /ping $NOISE_pid $timestamp >$client/linefeed &
- done
- fi
- ;;
- (*)
- echo "/set -q ping_timestamp $2" >$NOISE_pid/linefeed
- if test $NOISE_pid != $1 ; then
- echo "/set -q ping_challenger $1" >$NOISE_pid/linefeed
- echo "PING?"
- fi
-esac
diff --git a/noise/modules/play b/noise/modules/play
deleted file mode 100755
index 180c1e0c..00000000
--- a/noise/modules/play
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-case "$1" in
- (--help)
- echo "play an audio file" ;;
- (*)
- exec 2>&1
- ffs='wav mp3 ogg asf flac'
-
- if test -z "$*" ; then
- ls $HOME/noise/samples | sed '
- s:\.\('"`echo "$ffs" | tr \ \|`"'\)$: \1:
- s:^:/play :
- s:.*:&:
- '
- else
- for i in $ffs ; do
- f=$HOME/noise/samples/$1.$i
- test -f "$f" &&
- case "$i" in
- wav) aplay "$f" & ;;
- *) mplayer "$f" & ;;
- esac && break
- done || cat<<EOF
-\
-Keine Audiodatei mit dem Namen
-
- $1.EXT
-
-gefunden... am besten gleich uploaden:
-
- scp NAME shack@shack.shack:$HOME/noise/samples/
-
-folgende Dateiendungen werden erkannt: $ffs
-EOF
- fi
-esac
diff --git a/noise/modules/pong b/noise/modules/pong
deleted file mode 100755
index eb2df46d..00000000
--- a/noise/modules/pong
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-cd /tmp/noise
-case "$1" in
- (--help) : ;;
- ('')
- . $NOISE_pid/environment
- ping_timestamp=${ping_timestamp-0}
- ping_challenger=${ping_challenger-0}
- if test $ping_challenger = 0 ; then
- echo There is no ping challange running
- else
- timestamp=`date +%s%N`
- echo /pong $NOISE_pid $timestamp >$ping_challenger/linefeed
- ## reset ping TODO /unset
- echo /set -q ping_timestamp 0 >$NOISE_pid/linefeed
- echo /set -q ping_challenger 0 >$NOISE_pid/linefeed
- fi
- ;;
- (*)
- . $1/environment
- # XXX is attendee the right counterpart to 'challenger'?
- attendee_nick=$chat_nick
- . $NOISE_pid/environment
- time=`echo "scale=3; ($2 - $ping_timestamp)/10^9" | bc`
- echo "PONG! $attendee_nick ${time}s"
-esac
diff --git a/noise/modules/query b/noise/modules/query
deleted file mode 100755
index ceeff8a5..00000000
--- a/noise/modules/query
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo send a message to a specific user ;;
- (*)
- cd /tmp/noise
- . $NOISE_pid/environment
- nick="${chat_nick-$NOISE_pid}"
- target="$1"
- shift
- for client in * ; do
- . $client/environment
- if test "$target" = "${chat_nick-$client}" ; then
- echo "/echo <-- $nick: $*" > $client/linefeed
- echo "--> $target: $*"
- exit
- fi
- unset chat_channel
-
- done
-
- echo "$nick not found"
-esac
diff --git a/noise/modules/send_to_channel b/noise/modules/send_to_channel
deleted file mode 100755
index 4a0470af..00000000
--- a/noise/modules/send_to_channel
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) : ;;
- (*)
- cd /tmp/noise
- channel="$1"
- shift
- for client in * ; do
- . $client/environment
- if test "$channel" = "$chat_channel" && test "$default_command" = chat ; then
- echo "/echo $*" > $client/linefeed
- fi
- unset chat_channel
-
- done
-esac
diff --git a/noise/modules/sendmail b/noise/modules/sendmail
deleted file mode 100755
index 182d96e3..00000000
--- a/noise/modules/sendmail
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/python
-import os,sys,smtplib,string
-'''
- Mail Plugin for the noise telnet suite
- See: http://docs.python.org/library/smtplib.html
- Author: Felix
-'''
-
-# help
-if len(sys.argv) == 2:
- if sys.argv[1] == "--help":
- print "send an e-mail ( \"TO(s)\" \"SUBJECT\" [string instead of EOF])"
- sys.exit(0)
-
-# sanity
-if len(sys.argv) <= 2:
- print "wrong number of parameters, see help"
- sys.exit(1)
-
-# write variables
-# check of EOF
-if len(sys.argv) == 4 :
- EOFstring="%s\n"% sys.argv[3]
-else:
- EOFstring="EOF\n"
-
-fromaddr=u"Karl Koch<shockspasm@googlemail.com>"
-toaddrs=sys.argv[1]
-subject=sys.argv[2]
-
-
-#write header:
-msg = u"From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (fromaddr, toaddrs,subject)
-print "Write your text now, finish with %s" % EOFstring
-sys.stdout.flush() # flushing is important to make sure the line is written
-
-while 1:
- try:
- line = sys.stdin.readline()
- if line == EOFstring:
- break
- msg = msg + line
- except EOFError:
- break
-
-msg = msg + "[!] Written with NOISE telnet"
-
-print "Thank you for your message! Delivering it now..."
-sys.stdout.flush()
-server = smtplib.SMTP('localhost')
-#server.set_debuglevel(1)
-server.sendmail(fromaddr,toaddrs.split(','),msg)
-server.quit()
-print "mail send successfully"
-sys.exit(0)
diff --git a/noise/modules/shackstatus b/noise/modules/shackstatus
deleted file mode 100755
index a5058f0a..00000000
--- a/noise/modules/shackstatus
+++ /dev/null
@@ -1,104 +0,0 @@
-#! /bin/bash
-
-main() {
- case "$1" in
- (--help)
- echo "report status of all shack services."
- ;;
- (*)
- test "$(dig +short localhost @10.42.0.10 )" = "127.0.0.1" &&
- STAT_DNS_I="läuft" || STAT_DNS_I="antwortet nicht"
- test "$(dig +short shackspace.de @10.42.0.10 )" = "141.31.176.214" &&
- STAT_DNS_E="läuft" || STAT_DNS_E="antwortet nicht"
- test "$(dig +short shackspace.de @141.31.176.214 )" = "141.31.176.214" &&
- STAT_DNS_X="läuft"|| STAT_DNS_X="antwortet nicht"
-
- STAT_LINE=$(ping -c 5 -i 0.2 -q 141.31.176.214 |
- awk '/packet loss/ { print 100-$6}' )
-
- cat <<-EOF >$NOISE_linefeed
- /set pitch 10
- /espeak -v Hallo - Ich bin Krebs.
- /espeak -v Heute ist `wochentag`, der `tag` --- `monat` -- `date +%Y`
- /zeit
- /espeak -v tcheck der systeme:
- /espeak -v Energie versorgung -- aktiv
- /espeak -v shackhost -- läuft
- /espeak -v telnet -- läuft
- /espeak -v interner - D N S -- interne - do-mejn -- $STAT_DNS_I
- /espeak -v interner - D N S -- externe - do-mejn -- $STAT_DNS_E
- /espeak -v externer - D N S - $STAT_DNS_X
- /espeak -v Leitungsqualität - $STAT_LINE prozent.
- /temp
- /espeak -v krebs kompjuting bereit
- EOF
- ;;
- esac 2>&1
-}
-
-wochentag() {
- case $(date +%a) in
- (Mon) echo Montag ;;
- (Tue) echo Dienstag ;;
- (Wed) echo Mittwoch ;;
- (Thu) echo Donnerstag ;;
- (Fri) echo Freitag ;;
- (Sat) echo Samstag ;;
- (Sun) echo Sonntag ;;
- esac
-}
-
-tag() {
- case $(date +%d) in
- (1) echo erste ;;
- (2) echo zweite ;;
- (3) echo dritte ;;
- (4) echo vierte ;;
- (5) echo fünfte ;;
- (6) echo sechste ;;
- (7) echo siebte ;;
- (8) echo achte ;;
- (9) echo neunte ;;
- (10) echo zehnte ;;
- (11) echo elfte ;;
- (12) echo zwölfte ;;
- (13) echo dreizehnte ;;
- (14) echo vierzehnte ;;
- (15) echo fünfzehnte ;;
- (16) echo sechzehnte ;;
- (17) echo siebzehnte ;;
- (18) echo achtzehnte ;;
- (19) echo neunzehnte ;;
- (20) echo zwanzigste ;;
- (21) echo einundzwanzigste ;;
- (22) echo zweiundzwanzigste ;;
- (23) echo dreiundzwanzigste ;;
- (24) echo vierundzwanzigste ;;
- (25) echo füfundzwanzigste ;;
- (26) echo sechsundzwanzigste ;;
- (27) echo siebenundzwanzigste ;;
- (28) echo achtundzwanzigste ;;
- (29) echo neunundzwanzigste ;;
- (30) echo dreissigste ;;
- (31) echo einunddreissigste ;;
- esac
-}
-
-monat() {
- case $(date +%b) in
- (Jan) echo Januar ;;
- (Feb) echo Februar ;;
- (Mar) echo März ;;
- (Apr) echo April ;;
- (May) echo Mai ;;
- (Jun) echo Juni ;;
- (Jul) echo Juli ;;
- (Aug) echo August ;;
- (Sep) echo September ;;
- (Oct) echo Oktober ;;
- (Nov) echo November ;;
- (Dec) echo Dezember ;;
- esac
-}
-
-main "$@"
diff --git a/noise/modules/sleep b/noise/modules/sleep
deleted file mode 100755
index 89712cac..00000000
--- a/noise/modules/sleep
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/sh
-case "$1" in
- (--help) echo "pause for NUMBER seconds" ;;
- (*)
- if echo "$1" | grep -Eq '^([0-9]+(\.[0-9]*)?|[0-9]*\.[0-9]+)$' ; then
- sleep "$1"
- else
- echo 'FAIL: $1 is not a number'
- fi
-esac
diff --git a/noise/modules/stream b/noise/modules/stream
deleted file mode 100755
index 476ffff9..00000000
--- a/noise/modules/stream
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-sudo -u krebs /krebs/streams/streams "$@"
diff --git a/noise/modules/temp b/noise/modules/temp
deleted file mode 100755
index a11c3720..00000000
--- a/noise/modules/temp
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/bash
-
-temper=/krebs/temper/temper
-
-main() {
- case "${1--K}" in
- (--help)
- echo "report temperature in K, °C, °R, or °F."
- exit
- ;;
- (-C|--celsius) unit='Grad Zelsius' ; formula='x - 273.15' ;;
- (-F|--fahrenheit) unit='Grad Fahrenheit'; formula='x * 9/5 - 459.67' ;;
- (-R|--rankine) unit='Grad Renkin' ; formula='x * 9/5' ;;
- (-K|--kelvin) unit='Kelvin' ; formula='x' ;;
- (*)
- echo 'Error 1: you are made of stupid!'
- exit 23
- ;;
- esac
- if test -f $temper -a -x $temper; then
- espeak_inside `inside_temp "$formula"` $unit
- fi
- espeak_outside `outside_temp "$formula"` $unit
-}
-
-## temp [<formula with temperature as x>]
-## Echo temperature in K. If formula is given then return that result instead.
-inside_temp() {
- echo "scale=2; x=`$temper` + 273.15; ${1-x}" | bc
-}
-
-outside_temp() {
- echo "scale=2; x=`dig +short txt outside.elwood.temp.citecs.de |
- sed 's/^"DEG \([0-9]\+\.[0-9]\+\)"$/\1/'
- ` + 273.15; ${1-x}" | bc
-}
-
-espeak_inside() { echo Die Krebs-tempera-tur beträgt $@ | to_espeak; }
-espeak_outside() { echo Die Außen-tempera-tur beträgt $@ | to_espeak; }
-
-to_espeak() {
- sed '
- s/\(\.[0-9]\)0\+/\1/g
- s/\(\.[0-9]\)\([0-9]\)[0-9]*/ \1 \2 /;
- s/^-/minus /;
- s/\./ komma /;
- ' | tee $NOISE_linefeed
-}
-
-main "$@"
diff --git a/noise/modules/test b/noise/modules/test
deleted file mode 100755
index 2c0b8e0d..00000000
--- a/noise/modules/test
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help) echo do some test-module related stuff ;;
- (*)
-
- echo -n ">> "
- read TEST
- if [ $TEST == 'q' ]; then exit; fi
- echo /wall @@ $TEST >$NOISE_linefeed
- #sleep 1
- #sleep 1; echo /test >$NOISE_linefeed &
-esac
diff --git a/noise/modules/twitter b/noise/modules/twitter
deleted file mode 100755
index 26982525..00000000
--- a/noise/modules/twitter
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/python
-#encode=utf8
-
-#print "TODO Bug Robert to implement Twitter-OAuth!"
-#exit(1)
-import sys
-
-#sys.path.append("/usr/local/lib/")
-
-import twitter, os, pwd
-
-#os.getlogin = lambda: pwd.getpwuid(os.getuid())[0]
-
-sys.stderr = sys.stdout
-
-def shorten(text):
-
- text = text.replace("about ", "~")
- text = text.replace("an", "1")
- text = text.replace(" minutes", "m")
- text = text.replace(" minute", "m")
- text = text.replace(" hours", "h")
- text = text.replace(" hour", "h")
- text = text.replace(" seconds", "s")
- text = text.replace(" second", "s")
- text = text.replace(" days", "d")
- text = text.replace(" day", "d")
- text = text.replace(" weeks", "w")
- text = text.replace(" week", "w")
- text = text.replace(" years", "y")
- text = text.replace(" year", "y")
- text = text.replace(" ago", "")
- text = text.replace("a", "1")
- return text
-
-
-def parse(text):
- text = text.replace("\n","")
- t = text.split(" ")
- new = ""
- for piece in t:
- escape = ""
- if piece.startswith("@"):
- escape = ""
- if piece[1:].lower() == "shackspam" or piece[1:].lower() == "shackspace":
- escape = ""
-
- elif piece.startswith("#"):
- escape = ""
- elif piece.startswith("http://"):
- escape = ""
- if escape:
- new += escape + piece + " "
- else:
- new += piece + " "
-
- return new
-
-if len(sys.argv) > 1 and sys.argv[1] == "--help":
- print "read or post to the shackspam twitter timeline"
- if len(sys.argv) == 3 and sys.argv[2] == "--verbose":
- print "call without parameters to read"
- print "use /twitter [your tweet] to tweet something to the shackspam twitter timeline"
- exit()
-
-
-
-api = twitter.Api("Z7f9npE5ixvZ0lMCHDZBOg", "8z0gyfOABar1HxKvqL6fYXLqRFUPLQ9OOzDFt7Q4F4", "139766258-94TGPvNsJ8tYVv68eZewfXOIyDvRCWdycNlUgHrs", "NRnDQZPCoLrDizFvakZkSWgoG4vgGuT3OOMChSfiI")
-
-#api.SetXTwitterHeaders("Shackspace UTTERANCE","","0.00.0.01.42")
-
-if len(sys.argv) > 1:
-
-
- tweet = u""
-
- for t in sys.argv[1:]:
- tweet += t.decode("utf8") + u" "
- tweet = tweet[:-1]
-
- print u"Length: " + str(len(tweet)) + u""
-
- if len(tweet) > 140:
- print u"Your Tweet must be shorter than 140 characters.\n"
- exit()
-
- status = api.PostUpdate(tweet)
-
-
-
-
-else:
- """print "\tshackspace tweets:"
- for i in api.GetUserTimeline():
- i.text = parse(i.text)
- print ("" + i.user.screen_name + " " + i.GetRelativeCreatedAt() + " " + i.text).encode("utf8").replace("\n"," ")
-
- print "\n\tfriends tweets"
- """
- a = api.GetFriendsTimeline()
- a.reverse()
- for i in a:
- text = i.text
- ilen = len(i.user.screen_name) + len(shorten(i.GetRelativeCreatedAt())) + 2
- if i.user.screen_name.lower() == "shackspace" or i.user.screen_name.lower() == "shackspam":
- info = "" + i.user.screen_name + " " + shorten(i.GetRelativeCreatedAt()) + ""
- else:
- info = "" + i.user.screen_name + " " + shorten(i.GetRelativeCreatedAt()) + ""
- text = info + " " + parse(text)
-
- t = text.split(" ")
- tmp = ""
- for n in t:
- if ((len(tmp) + len(n)) >= 80):
- print parse(tmp).encode("utf8")
- tmp = " " * ilen
-
- tmp += " " + n
- if len(tmp) > ilen:
- print parse(tmp).encode("utf8")
-
-
-
-
-
diff --git a/noise/modules/vvs b/noise/modules/vvs
deleted file mode 100755
index fc23375f..00000000
--- a/noise/modules/vvs
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-
-wrapper() {
- exec 2>&1
- echo date: `date +%H:%M`
- "$@"
-}
-
-case "$1" in
- (--help) echo query VVS ;;
- (*)
- case $# in
- (2) wrapper vvs.de "$@" ;;
- (0) wrapper vvs ;;
- (*) echo "Syntax: /vvs [ORIGIN DESTINATION]" ; return ;;
- esac
-esac
diff --git a/noise/modules/wall b/noise/modules/wall
deleted file mode 100755
index c73744ea..00000000
--- a/noise/modules/wall
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh
-case "$1" in
- (--help) : ;;
- (?*)
- for linefeed in /tmp/noise/*/linefeed ; do
- echo /echo "$*" >$linefeed
- done
-esac
diff --git a/noise/modules/zeit b/noise/modules/zeit
deleted file mode 100755
index 9fbc33e4..00000000
--- a/noise/modules/zeit
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-
-case "$1" in
- (--help)
- echo "say current time" ;;
- (*)
- exec >>$NOISE_linefeed
- k=`date +%k|sed 's/^[[:space:]]*1[[:space:]]*$/ein/'`
- M=`date +%M|sed 's/0*//'`
- echo /set pitch 10
- case "$lang" in
- (de|'') echo "/espeak Es ist $k Uhr $M" ;;
- (en|*-en)
- test -z "$M" || M="and $M minutes"
- echo "/espeak It is $k o clock $M" ;;
- (*) echo "Error: unsupported lang = $lang" >&a