Show yucata stuff
authorJoachim Breitner <mail@joachim-breitner.de>
Fri, 7 Nov 2014 16:59:09 +0000 (17:59 +0100)
committerJoachim Breitner <mail@joachim-breitner.de>
Fri, 7 Nov 2014 17:02:23 +0000 (18:02 +0100)
.gitmodules [new file with mode: 0644]
gen-display.sh
yucata-tools [new submodule]
yucata.sh [new file with mode: 0755]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..3e87a29
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "yucata-tools"]
+       path = yucata-tools
+       url = git+ssh://gitolite@git.nomeata.de/yucata-tools.git
index f24b43e..41d0a12 100755 (executable)
@@ -3,6 +3,7 @@ cat <<__END__ > display.xml.new
 <alternate transition="scrollUp">
 $(./nagios-status.py)
 $(./forecast.py)
+$(./yucata.sh)
 </alternate>
 __END__
 mv display.xml.new display.xml
diff --git a/yucata-tools b/yucata-tools
new file mode 160000 (submodule)
index 0000000..0f5e206
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 0f5e2067a32aa5f7ffec5f0a76432db480864440
diff --git a/yucata.sh b/yucata.sh
new file mode 100755 (executable)
index 0000000..15df391
--- /dev/null
+++ b/yucata.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+n=$(./yucata-tools/yucata.py | perl -ne '/you can move at (\d+) games/; print $1')
+
+if [ "$n" -ne 0 ]
+then
+    echo "<spaceout><icon>pawn</icon><thintext>$n</thintext><icon>pawn</icon></spaceout>"
+fi