diff options
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 Binary files differnew file mode 100644 index 0000000..76045d2 --- /dev/null +++ b/configs/1n.env diff --git a/configs/1s.env b/configs/1s.env Binary files differnew file mode 100644 index 0000000..2595e7d --- /dev/null +++ b/configs/1s.env diff --git a/configs/2ne.env b/configs/2ne.env Binary files differnew file mode 100644 index 0000000..d9d79ef --- /dev/null +++ b/configs/2ne.env diff --git a/configs/2nw.env b/configs/2nw.env Binary files differnew file mode 100644 index 0000000..1e131a4 --- /dev/null +++ b/configs/2nw.env diff --git a/configs/2se.env b/configs/2se.env Binary files differnew file mode 100644 index 0000000..99a68a8 --- /dev/null +++ b/configs/2se.env diff --git a/configs/2sw.env b/configs/2sw.env Binary files differnew file mode 100644 index 0000000..cb84deb --- /dev/null +++ b/configs/2sw.env diff --git a/configs/_common.env b/configs/_common.env Binary files differnew file mode 100644 index 0000000..7514a7b --- /dev/null +++ b/configs/_common.env diff --git a/configs/b0.env b/configs/b0.env Binary files differnew file mode 100644 index 0000000..ad0a478 --- /dev/null +++ b/configs/b0.env diff --git a/configs/b1.env b/configs/b1.env Binary files differnew file mode 100644 index 0000000..d8c7fe5 --- /dev/null +++ b/configs/b1.env diff --git a/configs/b2.env b/configs/b2.env Binary files differnew file mode 100644 index 0000000..a9cf823 --- /dev/null +++ b/configs/b2.env diff --git a/configs/config.1n/db.json b/configs/config.1n/db.json Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.1n/db.json +++ /dev/null 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 Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.1s/db.json +++ /dev/null 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 Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.2ne/db.json +++ /dev/null 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 Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.2nw/db.json +++ /dev/null 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 Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.2se/db.json +++ /dev/null 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 Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.2sw/db.json +++ /dev/null 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 Binary files differdeleted file mode 100644 index 616e6c4..0000000 --- a/configs/config.eklasa/db.json +++ /dev/null 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 Binary files differnew file mode 100644 index 0000000..b29bbb5 --- /dev/null +++ b/configs/eklasa.env |