diff options
author | euer <root@euer.krebsco.de> | 2012-12-23 00:36:43 +0100 |
---|---|---|
committer | euer <root@euer.krebsco.de> | 2012-12-23 00:36:43 +0100 |
commit | 330cb43cbd2ee15d028376e6da9803453db0f8de (patch) | |
tree | 379267200d92f3fa3080820dd7791a57d2e03866 /god | |
parent | 8de83da090cb7e430658291f01bca171213982b9 (diff) |
//{streichelzoo,ivan} -> //god
Diffstat (limited to 'god')
-rw-r--r-- | god/ivan/Makefile | 7 | ||||
-rwxr-xr-x | god/ivan/ivan | 27 | ||||
-rwxr-xr-x | god/ivan/ivan-startup | 74 | ||||
-rw-r--r-- | god/ivan/satz-liste | 17 | ||||
-rw-r--r-- | god/streichelzoo/README | 2 | ||||
-rw-r--r-- | god/streichelzoo/button_down.png | bin | 0 -> 6501 bytes | |||
-rw-r--r-- | god/streichelzoo/button_up.png | bin | 0 -> 6655 bytes | |||
-rw-r--r-- | god/streichelzoo/main.avg | 31 | ||||
-rw-r--r-- | god/streichelzoo/streichelzoo.py | 31 |
9 files changed, 189 insertions, 0 deletions
diff --git a/god/ivan/Makefile b/god/ivan/Makefile new file mode 100644 index 00000000..38eb1da2 --- /dev/null +++ b/god/ivan/Makefile @@ -0,0 +1,7 @@ +.PHONY: infest +BIN_DIR = ../bin +infest: + cp ivan ${INSTALL_DIR} +debian-startup: + cp ivan-startup /etc/init.d/ivan + update-rc.d evan start diff --git a/god/ivan/ivan b/god/ivan/ivan new file mode 100755 index 00000000..5099114a --- /dev/null +++ b/god/ivan/ivan @@ -0,0 +1,27 @@ +#!/bin/bash +SATZ_LISTE=/krebs/ivan/satz-liste +p="${noise_pitch-10}" +v="${noise_lang-de}" +k="${noise_capital-0}" +a="${noise_amplitude-600}" +g="${noise_gap-1}" +RND_DELAY=3600 +#set -x +function helpme () +{ + cat << EOF + $0 [-d] + -d -- daemonize + -h -- this help file +EOF + exit 0 +} + +[ "${1:-}" = "-h" ] && helpme + +while true +do + espeak -v $v -p $p -k $k -a $a -g $g "`shuf \"$SATZ_LISTE\" | tail -1`" + [ ! "${1:-}" = "-d" ] && exit 0 # break if not daemonized + sleep $((${RANDOM}%${RND_DELAY})) +done diff --git a/god/ivan/ivan-startup b/god/ivan/ivan-startup new file mode 100755 index 00000000..8a7f8daa --- /dev/null +++ b/god/ivan/ivan-startup @@ -0,0 +1,74 @@ +#! /bin/sh +# +### BEGIN INIT INFO +# Provides: evan +# Required-Start: $remote_fs $network +# Required-Stop: $remote_fs $network +# Should-Start: $syslog $named +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start evan daemons +# Description: + +### END INIT INFO +# +# Based on Lubomir Bulej's Redhat init script. + +DAEMON="/root/bin/evan" +PIDFILE="/var/lock/evan" +NAME="evan" +DESC="evan daemons" +TCONF="/etc/evan" + +test -f $DAEMON || exit 0 + +[ -r /etc/default/evan ] && . /etc/default/evan + + +start() { + [ -e $PIDFILE ] && echo "$PIDFILE already exists" && return + $DAEMON $EXTRA -d "$@" & + echo $(($$+1)) > $PIDFILE #TODO fix this ugly hack! +} +stop() { + [ ! -e $PIDFILE ] && echo "$PIDFILE does not exist" && return + kill `cat $PIDFILE` + #killall evan + rm $PIDFILE +} + +reload() { + echo "do nothing" + # do nothing +} + +restart() { + stop "$@" + start "$@" +} + +case "$1" in + start) + echo -n "Starting $DESC:" + start + ;; + stop) + echo -n "Stopping $DESC:" + stop + ;; + reload|force-reload) + echo -n "Reloading $DESC configuration:" + reload + ;; + restart) + echo -n "Restarting $DESC:" + restart + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}" + exit 1 + ;; +esac +echo "done" +exit 0 diff --git a/god/ivan/satz-liste b/god/ivan/satz-liste new file mode 100644 index 00000000..44f84c13 --- /dev/null +++ b/god/ivan/satz-liste @@ -0,0 +1,17 @@ +wenn ich meinen erzeugten abfall vor dem nach hause gehen beseitige steigt mein soziales ansehen +bringe eine pflanze mit +ein sauberer scheck ist ein guter scheck +auch du weißt wie man den geschirrspüler einräumt +wer die toilette putzt kommt in den himmel +der große bruder sieht es gerne wenn die genossen die vereinsräume in stand halten +muelltrennung bringt gutes karma +dokumentiere deine projekte +werbe neue mitglieder +fnord +bewässere die Pflanzen +Öffne ein Fenster +wische die tische +Weniger Licht ist mehr +sammle pfandflaschen ein +zahle deinen mitgliedsbeitrag + diff --git a/god/streichelzoo/README b/god/streichelzoo/README new file mode 100644 index 00000000..f93eb8c5 --- /dev/null +++ b/god/streichelzoo/README @@ -0,0 +1,2 @@ +Streichelzoo is a libavg based touchscreen interface for shackspace interface controll and is currently under development. +As you already read it still is under development and not yet working. diff --git a/god/streichelzoo/button_down.png b/god/streichelzoo/button_down.png Binary files differnew file mode 100644 index 00000000..f952aabf --- /dev/null +++ b/god/streichelzoo/button_down.png diff --git a/god/streichelzoo/button_up.png b/god/streichelzoo/button_up.png Binary files differnew file mode 100644 index 00000000..71253b23 --- /dev/null +++ b/god/streichelzoo/button_up.png diff --git a/god/streichelzoo/main.avg b/god/streichelzoo/main.avg new file mode 100644 index 00000000..2a67a881 --- /dev/null +++ b/god/streichelzoo/main.avg @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<avg width="1024" height="768" active="True" > + <div id="mainwindow" active="True"> + <div id="welcometext" x="0" y="70" width="1024" active="True"> + <words x="1024" y="10" + text="Willkommen im shackspace" + font="arial" fontsize="100"/> + <words x="1024" y="10" + text="Welcome to shackspace" + font="arial" fontsize="100"/> + <words x="1024" y="10" + text="Benevudi a shackspace" + font="arial" fontsize="100"/> + <words x="1024" y="10" + text="Bienvenue à la shackspace" + font="arial" fontsize="100"/> + </div> + <image id="light" href="button_up.png" x="50" y="250"/> + <image id="roster" href="button_up.png" x="50" y="400"/> + <image id="blank" href="button_up.png" x="50" y="550"/> + <words id="txt_light" x="175" y="250" fontsize="80" variant="bold" text="lightcontrol"/> + <words id="txt_roster" x="175" y="400" fontsize="80" variant="bold" text="current roster"/> + <words id="txt_blank" x="175" y="550" fontsize="80" variant="bold" text="blank"/> + </div> + <div id="lightcontrol" active="False" width="1024" height="768"> + <div id="segment1" height="200" width="400" x="50" y="50" active="False"> + <words id="test" text="test"/> + </div> + </div> + <image id="logo" href="shack.png" x="880" y="460" /> +</avg> diff --git a/god/streichelzoo/streichelzoo.py b/god/streichelzoo/streichelzoo.py new file mode 100644 index 00000000..25b83964 --- /dev/null +++ b/god/streichelzoo/streichelzoo.py @@ -0,0 +1,31 @@ +#! /bin/python +from libavg import * + +#This function is a slightly modified version of cmiles code from dev.c-base.org/c_leuse/c_leuse.git +#It takes a bunch of word nodes an slides them from left to right just as the HTML <marquee> function +line = 16 +def welcomeScroll(): + global line + line += 1 + textNode = player.getElementByID("welcometext") + if line >= textNode.getNumChildren(): + line = 0 + node = textNode.getChild(line) + LinearAnim(node, "x", 11500, 1200, -1400, -1000, None, welcomeScroll).start() +# +def start_lightcontrol(event): + mainwindow = player.getElementByID("mainwindow") + lightcontrolwindow = player.getElementByID("lightcontrol") + mainwindow.active =False + lightcontrolwindow.active =True + + +player = avg.Player.get() +player.loadFile("main.avg") + +player.setTimeout(10, welcomeScroll) +player.getElementByID("light").setEventHandler(avg.CURSORDOWN, avg.MOUSE, start_lightcontrol) +#player.getElementByID("roster").setEventHandler(avg.CURSORDOWN, avg.MOUSE, buttondown) +#player.getElementByID("blank").setEventHandler(avg.CURSORDOWN, avg.MOUSE, buttondown) +player.play() + |