summaryrefslogtreecommitdiff
path: root/bin/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build.sh')
-rwxr-xr-xbin/build.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/build.sh b/bin/build.sh
new file mode 100755
index 0000000..4cd0f90
--- /dev/null
+++ b/bin/build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+CONFIG=$1
+DIR=$2
+rm config/dates.json
+ln -s $CONFIG config/dates.json
+PREV_DATE=""
+cat config/dates.json |
+ jq '.[] | .date, .url, .index, .name' |
+ xargs -n4 |
+ while read DATE URL INDEX NAME
+ do
+ python ranking.py $DATE $PREV_DATE > $DIR/$URL
+ PREV_DATE=$DATE
+ done
+find $DIR -maxdepth 1 -type f -name \*.html |
+ while read FILE
+ do
+ python editions.py $FILE
+ done
+python players.py $DIR/players