-
Notifications
You must be signed in to change notification settings - Fork 4
/
convert-all-csv.sh
executable file
·23 lines (23 loc) · 1.02 KB
/
convert-all-csv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
echo "Writing to " $2
mkdir -p $2
echo "Extracting club info"
export BASE=`basename $1`
jq -r -f ./src/jq/club-csv.jq $1 > "$2/$BASE-club.csv"
echo "Extracting hole info"
jq -r -f ./src/jq/hole-csv.jq $1 > "$2/$BASE-hole.csv"
echo "Extracting score info"
jq -r -f ./src/jq/scorecard-csv.jq $1 > "$2/$BASE-scorecard.csv"
echo "Extracting shot row info"
jq -r -f ./src/jq/shot-detail-row-order.jq $1 > "$2/$BASE-shots-row.csv"
echo "Extracting shot column info"
jq -r -f ./src/jq/shot-detail-col-order.jq $1 > "$2/$BASE-shots-col.csv"
echo "Extracting Last 10 Stats"
jq -r -f ./src/jq/last-10-stats.jq $1 > "$2/$BASE-last-10-stats.csv"
echo "Extracting Last 10 Drive"
jq -r -f ./src/jq/last-10-drive.jq $1 > "$2/$BASE-last-10-drive.csv"
echo "Extracting Last 10 approach"
jq -r -f ./src/jq/last-10-approach.jq $1 > "$2/$BASE-last-10-approach.csv"
echo "Extracting Last 10 chip"
jq -r -f ./src/jq/last-10-approach.jq $1 > "$2/$BASE-last-10-approach.csv"
echo "Extracting Last 10 putt"
jq -r -f ./src/jq/last-10-putt.jq $1 > "$2/$BASE-last-10-putt.csv"