summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-09-07 00:50:15 +0200
committeremkael <emkael@tlen.pl>2017-09-07 00:50:15 +0200
commit9123253d8785a12ceb30df5f0bd67b27deda1e10 (patch)
treeb564229ab58473c302dbfba59630e0cbcba2d615 /bin
parentde19dcc91dd149b542ed4946fae093ca30fafb5e (diff)
Generating ranking table data in separate JSON files, rather than inline HTML
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-datafiles.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/build-datafiles.sh b/bin/build-datafiles.sh
new file mode 100755
index 0000000..bde7bc1
--- /dev/null
+++ b/bin/build-datafiles.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+CONFIG=$1
+DIR=$2
+PREV_DATE=""
+cat $CONFIG |
+ jq -r '.[] | .date' |
+ while read DATE
+ do
+ python datafile.py $DATE $PREV_DATE > "$DIR/$DATE.json"
+ PREV_DATE=$DATE
+ done