RPGs4_sanity/pull.sh

29 lines
682 B
Bash
Raw Normal View History

2022-10-11 02:53:15 +02:00
#!/usr/bin/env bash
test -d pvv && rm -rfv pvv
test -e pvv && {
>&2 echo "'pvv' is not a directory"
exit 1
}
mkdir -p pvv/{cards,styles}
2022-11-20 00:37:48 +01:00
#./api.py get-styles | hjson -c | jq '.[].id' --raw-output |
./api.py get-styles | jq '.[].id' --raw-output |
2022-10-11 02:53:15 +02:00
while read style_id; do
(set -x
2022-10-14 00:50:52 +02:00
./api.py get-style $style_id > pvv/styles/$style_id.html
2022-10-11 02:53:15 +02:00
) &
done
./api.py get-card-groups | jq '.[] | select(has("share")) | .id' --raw-output |
while read group_id; do
./api.py get-card-group $group_id | jq '.[].id' --raw-output |
while read card_id; do
(set -x
./api.py get-card $card_id > pvv/cards/$card_id.xml
) &
done
done
wait