summaryrefslogtreecommitdiff
path: root/bin/build-rankings.sh
blob: 1896afb2469fe069019e70f6d73686d0ea752ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
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