summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rwxr-xr-xscripts/generate-all.sh27
m---------scripts/jfrteamy-playoff0
-rwxr-xr-xscripts/setup.sh9
4 files changed, 39 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..94869c4
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "scripts/jfrteamy-playoff"]
+ path = scripts/jfrteamy-playoff
+ url = https://github.com/emkael/jfrteamy-playoff.git
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
+