summaryrefslogtreecommitdiff
path: root/scripts/archive/generate-all.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/archive/generate-all.sh')
-rwxr-xr-xscripts/archive/generate-all.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/archive/generate-all.sh b/scripts/archive/generate-all.sh
new file mode 100755
index 0000000..dac5f99
--- /dev/null
+++ b/scripts/archive/generate-all.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+set -e
+
+cd "$(dirname "$0")"/jfrteamy-playoff
+python=venv/bin/python
+output_file=output.html
+
+generate_playoff () {
+ rm -f $output_file
+ filename=$1
+ ftp_path=$2
+ echo "Generating $filename to $ftp_path..."
+ $python playoff.py ../../$filename.jtpo
+ echo "Uploading to $ftp_path..."
+ scp $output_file playoff@webserver.pzbs.pl:~/liga/$ftp_path
+ rm -f $output_file
+ echo "Done"
+}
+
+generate_playoff eklasa ekstraklasa/playoff.html
+generate_playoff 1n 1liga/n/playoff.html
+generate_playoff 1s 1liga/s/playoff.html
+generate_playoff 2nw 2liga/nw/playoff.html
+generate_playoff 2ne 2liga/ne/playoff.html
+generate_playoff 2se 2liga/se/playoff.html
+generate_playoff 2sw 2liga/sw/playoff.html