summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichal Zimniewicz <mzimniew@man.poznan.pl>2018-02-23 23:21:51 +0100
committerMichal Zimniewicz <mzimniew@man.poznan.pl>2018-02-23 23:59:24 +0100
commitde1270af7c3159a721ee590d1ed8e8d91f8b628b (patch)
treecac9a417c2fe71272b851f62815bf34f8019f521 /scripts
parentacc917156b00de8f6ba24c4664ff213a0d2d2fe3 (diff)
add scripts
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-all.sh27
m---------scripts/jfrteamy-playoff0
-rwxr-xr-xscripts/setup.sh9
3 files changed, 36 insertions, 0 deletions
diff --git a/scripts/generate-all.sh b/scripts/generate-all.sh
new file mode 100755
index 0000000..f6e64e0
--- /dev/null
+++ b/scripts/generate-all.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+
+cd "$(dirname "$0")"/jfrteamy-playoff
+python=venv/bin/python
+
+# level = 1 or 2
+# group = "n" or "nw" or "se" or ...
+generate_playoff () {
+ rm -f playoff.html
+ level=$1
+ group=$2
+ echo "Generating $level$group..."
+ $python playoff.py ../../$level$group.json
+ echo "Uploading $level$group..."
+ scp playoff.html pzbs:~/liga/${level}liga/$group/playoff.html
+ rm -f playoff.html
+ echo "Done"
+}
+
+generate_playoff 1 n
+generate_playoff 1 s
+generate_playoff 2 nw
+generate_playoff 2 ne
+generate_playoff 2 se
+generate_playoff 2 sw
+
diff --git a/scripts/jfrteamy-playoff b/scripts/jfrteamy-playoff
new file mode 160000
+Subproject 7d8b36b7f2a3a75eaf0c1ce15a2c567d6fc2fb1
diff --git a/scripts/setup.sh b/scripts/setup.sh
new file mode 100755
index 0000000..216cfa2
--- /dev/null
+++ b/scripts/setup.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+cd "$(dirname "$0")"/jfrteamy-playoff
+
+if [ ! -d venv ]; then
+ virtualenv venv
+fi
+venv/bin/pip install -r requirements.txt
+