summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rwxr-xr-xausbutler-single.sh10
-rw-r--r--config.template/butler.json (renamed from configs/config.1n/butler.json)2
-rw-r--r--config.template/db.json6
-rw-r--r--config.template/goniec.json (renamed from configs/goniec.json)0
-rw-r--r--config.template/logoh.json (renamed from configs/logoh.json)0
-rw-r--r--config.template/send.lftp3
-rw-r--r--config.template/translations.json (renamed from configs/translations.json)0
-rw-r--r--configs/1n.envbin0 -> 129 bytes
-rw-r--r--configs/1s.envbin0 -> 129 bytes
-rw-r--r--configs/2ne.envbin0 -> 132 bytes
-rw-r--r--configs/2nw.envbin0 -> 132 bytes
-rw-r--r--configs/2se.envbin0 -> 132 bytes
-rw-r--r--configs/2sw.envbin0 -> 132 bytes
-rw-r--r--configs/_common.envbin0 -> 245 bytes
-rw-r--r--configs/b0.envbin0 -> 129 bytes
-rw-r--r--configs/b1.envbin0 -> 135 bytes
-rw-r--r--configs/b2.envbin0 -> 135 bytes
-rw-r--r--configs/config.1n/db.jsonbin99 -> 0 bytes
l---------configs/config.1n/goniec.json1
l---------configs/config.1n/logoh.json1
l---------configs/config.1n/translations.json1
-rw-r--r--configs/config.1s/butler.json8
-rw-r--r--configs/config.1s/db.jsonbin99 -> 0 bytes
l---------configs/config.1s/goniec.json1
l---------configs/config.1s/logoh.json1
l---------configs/config.1s/translations.json1
-rw-r--r--configs/config.2ne/butler.json8
-rw-r--r--configs/config.2ne/db.jsonbin99 -> 0 bytes
l---------configs/config.2ne/goniec.json1
l---------configs/config.2ne/logoh.json1
l---------configs/config.2ne/translations.json1
-rw-r--r--configs/config.2nw/butler.json8
-rw-r--r--configs/config.2nw/db.jsonbin99 -> 0 bytes
l---------configs/config.2nw/goniec.json1
l---------configs/config.2nw/logoh.json1
l---------configs/config.2nw/translations.json1
-rw-r--r--configs/config.2se/butler.json8
-rw-r--r--configs/config.2se/db.jsonbin99 -> 0 bytes
l---------configs/config.2se/goniec.json1
l---------configs/config.2se/logoh.json1
l---------configs/config.2se/translations.json1
-rw-r--r--configs/config.2sw/butler.json8
-rw-r--r--configs/config.2sw/db.jsonbin99 -> 0 bytes
l---------configs/config.2sw/goniec.json1
l---------configs/config.2sw/logoh.json1
l---------configs/config.2sw/translations.json1
-rw-r--r--configs/config.eklasa/butler.json8
-rw-r--r--configs/config.eklasa/db.jsonbin99 -> 0 bytes
l---------configs/config.eklasa/goniec.json1
l---------configs/config.eklasa/logoh.json1
l---------configs/config.eklasa/translations.json1
-rw-r--r--configs/eklasa.envbin0 -> 136 bytes
53 files changed, 20 insertions, 72 deletions
diff --git a/.gitattributes b/.gitattributes
index 61ec02c..38871a4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-configs/*/db.json filter=git-crypt diff=git-crypt
+configs/*.env filter=git-crypt diff=git-crypt
diff --git a/ausbutler-single.sh b/ausbutler-single.sh
index 322c9ab..2f95c68 100755
--- a/ausbutler-single.sh
+++ b/ausbutler-single.sh
@@ -5,7 +5,15 @@ cd "$(dirname "$0")"
echo "Processing $TOURNAMENT..."
-ln -sfn configs/config.$TOURNAMENT config
+set -o allexport
+source configs/_common.env
+source configs/$TOURNAMENT.env
+set +o allexport
+
+ls config.template | while read CONFIGFILE
+do
+ envsubst < config.template/$CONFIGFILE > config/$CONFIGFILE
+done
python jfrteamy-ausbutler/butler.py calculate generate nowait
echo "Done"
diff --git a/configs/config.1n/butler.json b/config.template/butler.json
index 0f62f7a..915c535 100644
--- a/configs/config.1n/butler.json
+++ b/config.template/butler.json
@@ -4,5 +4,5 @@
"opponent_factor": 0.5,
"only_current": 0,
"segments_in_table_limit": 10,
- "output_path": "./output"
+ "output_path": "${LIGA_AUSBUTLER_OUTPUT_PATH}"
}
diff --git a/config.template/db.json b/config.template/db.json
new file mode 100644
index 0000000..845e368
--- /dev/null
+++ b/config.template/db.json
@@ -0,0 +1,6 @@
+{
+ "user": "${LIGA_AUSBUTLER_DB_USER}",
+ "pass": "${LIGA_AUSBUTLER_DB_PASS}",
+ "db": "${LIGA_AUSBUTLER_DB_NAME}",
+ "host": "${LIGA_AUSBUTLER_DB_HOST}"
+}
diff --git a/configs/goniec.json b/config.template/goniec.json
index 3b9c1bd..3b9c1bd 100644
--- a/configs/goniec.json
+++ b/config.template/goniec.json
diff --git a/configs/logoh.json b/config.template/logoh.json
index 6420b3f..6420b3f 100644
--- a/configs/logoh.json
+++ b/config.template/logoh.json
diff --git a/config.template/send.lftp b/config.template/send.lftp
new file mode 100644
index 0000000..5c422f7
--- /dev/null
+++ b/config.template/send.lftp
@@ -0,0 +1,3 @@
+open -u ${LIGA_AUSBUTLER_FTP_USER} -p ${LIGA_AUSBUTLER_FTP_PASS} ${LIGA_AUSBUTLER_FTP_HOST}
+cd ${LIGA_AUSBUTLER_FTP_PATH}
+mput ${LIGA_AUSBUTLER_OUTPUT_PATH}/*
diff --git a/configs/translations.json b/config.template/translations.json
index b4df4a3..b4df4a3 100644
--- a/configs/translations.json
+++ b/config.template/translations.json
diff --git a/configs/1n.env b/configs/1n.env
new file mode 100644
index 0000000..76045d2
--- /dev/null
+++ b/configs/1n.env
Binary files differ
diff --git a/configs/1s.env b/configs/1s.env
new file mode 100644
index 0000000..2595e7d
--- /dev/null
+++ b/configs/1s.env
Binary files differ
diff --git a/configs/2ne.env b/configs/2ne.env
new file mode 100644
index 0000000..d9d79ef
--- /dev/null
+++ b/configs/2ne.env
Binary files differ
diff --git a/configs/2nw.env b/configs/2nw.env
new file mode 100644
index 0000000..1e131a4
--- /dev/null
+++ b/configs/2nw.env
Binary files differ
diff --git a/configs/2se.env b/configs/2se.env
new file mode 100644
index 0000000..99a68a8
--- /dev/null
+++ b/configs/2se.env
Binary files differ
diff --git a/configs/2sw.env b/configs/2sw.env
new file mode 100644
index 0000000..cb84deb
--- /dev/null
+++ b/configs/2sw.env
Binary files differ
diff --git a/configs/_common.env b/configs/_common.env
new file mode 100644
index 0000000..7514a7b
--- /dev/null
+++ b/configs/_common.env
Binary files differ
diff --git a/configs/b0.env b/configs/b0.env
new file mode 100644
index 0000000..ad0a478
--- /dev/null
+++ b/configs/b0.env
Binary files differ
diff --git a/configs/b1.env b/configs/b1.env
new file mode 100644
index 0000000..d8c7fe5
--- /dev/null
+++ b/configs/b1.env
Binary files differ
diff --git a/configs/b2.env b/configs/b2.env
new file mode 100644
index 0000000..a9cf823
--- /dev/null
+++ b/configs/b2.env
Binary files differ
diff --git a/configs/config.1n/db.json b/configs/config.1n/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.1n/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.1n/goniec.json b/configs/config.1n/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.1n/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.1n/logoh.json b/configs/config.1n/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.1n/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.1n/translations.json b/configs/config.1n/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.1n/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/config.1s/butler.json b/configs/config.1s/butler.json
deleted file mode 100644
index 0f62f7a..0000000
--- a/configs/config.1s/butler.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "cutoff_point": 24,
- "cutoff_rate": 0.25,
- "opponent_factor": 0.5,
- "only_current": 0,
- "segments_in_table_limit": 10,
- "output_path": "./output"
-}
diff --git a/configs/config.1s/db.json b/configs/config.1s/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.1s/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.1s/goniec.json b/configs/config.1s/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.1s/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.1s/logoh.json b/configs/config.1s/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.1s/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.1s/translations.json b/configs/config.1s/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.1s/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/config.2ne/butler.json b/configs/config.2ne/butler.json
deleted file mode 100644
index 0f62f7a..0000000
--- a/configs/config.2ne/butler.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "cutoff_point": 24,
- "cutoff_rate": 0.25,
- "opponent_factor": 0.5,
- "only_current": 0,
- "segments_in_table_limit": 10,
- "output_path": "./output"
-}
diff --git a/configs/config.2ne/db.json b/configs/config.2ne/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.2ne/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.2ne/goniec.json b/configs/config.2ne/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.2ne/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.2ne/logoh.json b/configs/config.2ne/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.2ne/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.2ne/translations.json b/configs/config.2ne/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.2ne/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/config.2nw/butler.json b/configs/config.2nw/butler.json
deleted file mode 100644
index 0f62f7a..0000000
--- a/configs/config.2nw/butler.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "cutoff_point": 24,
- "cutoff_rate": 0.25,
- "opponent_factor": 0.5,
- "only_current": 0,
- "segments_in_table_limit": 10,
- "output_path": "./output"
-}
diff --git a/configs/config.2nw/db.json b/configs/config.2nw/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.2nw/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.2nw/goniec.json b/configs/config.2nw/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.2nw/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.2nw/logoh.json b/configs/config.2nw/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.2nw/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.2nw/translations.json b/configs/config.2nw/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.2nw/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/config.2se/butler.json b/configs/config.2se/butler.json
deleted file mode 100644
index 0f62f7a..0000000
--- a/configs/config.2se/butler.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "cutoff_point": 24,
- "cutoff_rate": 0.25,
- "opponent_factor": 0.5,
- "only_current": 0,
- "segments_in_table_limit": 10,
- "output_path": "./output"
-}
diff --git a/configs/config.2se/db.json b/configs/config.2se/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.2se/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.2se/goniec.json b/configs/config.2se/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.2se/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.2se/logoh.json b/configs/config.2se/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.2se/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.2se/translations.json b/configs/config.2se/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.2se/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/config.2sw/butler.json b/configs/config.2sw/butler.json
deleted file mode 100644
index 0f62f7a..0000000
--- a/configs/config.2sw/butler.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "cutoff_point": 24,
- "cutoff_rate": 0.25,
- "opponent_factor": 0.5,
- "only_current": 0,
- "segments_in_table_limit": 10,
- "output_path": "./output"
-}
diff --git a/configs/config.2sw/db.json b/configs/config.2sw/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.2sw/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.2sw/goniec.json b/configs/config.2sw/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.2sw/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.2sw/logoh.json b/configs/config.2sw/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.2sw/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.2sw/translations.json b/configs/config.2sw/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.2sw/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/config.eklasa/butler.json b/configs/config.eklasa/butler.json
deleted file mode 100644
index 0f62f7a..0000000
--- a/configs/config.eklasa/butler.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "cutoff_point": 24,
- "cutoff_rate": 0.25,
- "opponent_factor": 0.5,
- "only_current": 0,
- "segments_in_table_limit": 10,
- "output_path": "./output"
-}
diff --git a/configs/config.eklasa/db.json b/configs/config.eklasa/db.json
deleted file mode 100644
index 616e6c4..0000000
--- a/configs/config.eklasa/db.json
+++ /dev/null
Binary files differ
diff --git a/configs/config.eklasa/goniec.json b/configs/config.eklasa/goniec.json
deleted file mode 120000
index 5954b9b..0000000
--- a/configs/config.eklasa/goniec.json
+++ /dev/null
@@ -1 +0,0 @@
-../goniec.json \ No newline at end of file
diff --git a/configs/config.eklasa/logoh.json b/configs/config.eklasa/logoh.json
deleted file mode 120000
index 7910e73..0000000
--- a/configs/config.eklasa/logoh.json
+++ /dev/null
@@ -1 +0,0 @@
-../logoh.json \ No newline at end of file
diff --git a/configs/config.eklasa/translations.json b/configs/config.eklasa/translations.json
deleted file mode 120000
index d53e316..0000000
--- a/configs/config.eklasa/translations.json
+++ /dev/null
@@ -1 +0,0 @@
-../translations.json \ No newline at end of file
diff --git a/configs/eklasa.env b/configs/eklasa.env
new file mode 100644
index 0000000..b29bbb5
--- /dev/null
+++ b/configs/eklasa.env
Binary files differ