summaryrefslogtreecommitdiff
path: root/bin/build.sh
blob: 065fcbbb95bd7dc8c62bc329b6b970eb040a8411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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
find $DIR -maxdepth 1 -type f -name \*.html |
    while read FILE
    do
        python editions.py $FILE
        htmlmin $FILE $FILE.tmp
        mv $FILE.tmp $FILE
    done
python players.py $DIR/players