29 lines
840 B
Bash
Executable File
29 lines
840 B
Bash
Executable File
#!/bin/bash
|
|
|
|
curl_() { curl "$@"; }
|
|
mktemp_() { mktemp --tmpdir aruppi-jobs.XXXXXXXXXX "$@"; }
|
|
|
|
echo "querying artist..."
|
|
artists_file=`mktemp_`
|
|
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/artists" > "$artists_file"
|
|
|
|
for artist_id in `jq -r '.[][] | .id' "$artists_file" 2>/dev/null`
|
|
do
|
|
themes_file=`mktemp_`
|
|
echo " querying $artist_id info"
|
|
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/artists/$artist_id" > "$themes_file"
|
|
|
|
for title in `jq -r '.[][] | .title | @base64' "$themes_file" 2>/dev/null`
|
|
do
|
|
title=`echo $title | base64 -d`
|
|
echo " querying $title"
|
|
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/themes/$title" > /dev/null
|
|
done
|
|
|
|
rm "$themes_file"
|
|
done
|
|
|
|
rm "$artists_file"
|
|
echo "finished themesYear"
|
|
|