simplify games table

This commit is contained in:
filifa
2024-08-08 22:17:11 -05:00
parent 0a15e0586b
commit 97b63bfeba
4 changed files with 10 additions and 16 deletions

View File

@@ -29,7 +29,7 @@ then
exit 1
fi
jqFilter='.dates[].games[] | "\(.gamePk)\(.)"'
fmt="OFS=\"\"; print \$1, \$2, 0"
jqFilter='.dates[].games[]'
fmt="OFS=\"\"; print \$0, 0"
save="\"sqlite3 $db '.mode ascii' '.separator ' '.import /dev/stdin games'\""
mlblive schedule -t $team | jq -r "$jqFilter" | awk -F  "{$fmt | $save; close($save)}"
mlblive schedule -t $team | jq -Sc "$jqFilter" | awk -F  "{$fmt | $save; close($save)}"