summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-06-07 22:45:28 +0200
committeremkael <emkael@tlen.pl>2017-06-07 22:45:28 +0200
commit8905ba09f9132370c34220ec48bf4b4a5de97106 (patch)
tree4436755737cc8692daf2aff408bec655a9c8f992 /bin
parent6382165c2c1358d2e2b7f941f9cf662084e3b51d (diff)
Proper build mechanism
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-players.sh3
-rwxr-xr-xbin/build-rankings.sh12
-rwxr-xr-xbin/make.sh2
3 files changed, 15 insertions, 2 deletions
diff --git a/bin/build-players.sh b/bin/build-players.sh
new file mode 100755
index 0000000..93edf63
--- /dev/null
+++ b/bin/build-players.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+DIR=$1
+python players.py $DIR/players
diff --git a/bin/build-rankings.sh b/bin/build-rankings.sh
new file mode 100755
index 0000000..1896afb
--- /dev/null
+++ b/bin/build-rankings.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+CONFIG=$1
+DIR=$2
+PREV_DATE=""
+cat $CONFIG |
+ jq '.[] | .date, .url, .index, .name' |
+ xargs -n4 |
+ while read DATE URL INDEX NAME
+ do
+ python ranking.py "$NAME" $INDEX $DATE $PREV_DATE > $DIR/$URL
+ PREV_DATE=$DATE
+ done
diff --git a/bin/make.sh b/bin/make.sh
deleted file mode 100755
index 4bc8749..0000000
--- a/bin/make.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/build.sh config/dates.json http