custom temp dir

This commit is contained in:
Darkangeel-hd 2020-07-28 00:41:43 +02:00
parent da531042d2
commit 55efa63309
6 changed files with 24 additions and 18 deletions

View File

@ -1,15 +1,16 @@
#!/bin/bash
curl_(){ curl "$@"; }
curl_() { curl "$@"; }
mktemp_() { mktemp -p "" aruppi-jobs.XXXXXXXXXX "$@"; }
echo "querying ALL ANIME..."
all_file=`mktemp`
all_file=`mktemp_`
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/allAnimes" > "$all_file"
for title in `jq -r '.[][] | .title | @base64' "$all_file" 2>/dev/null`
do
title=`echo $title | base64 -d`
info_file=`mktemp`
info_file=`mktemp_`
echo " querying $title info"
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/moreInfo/$title" > "$info_file"

View File

@ -1,14 +1,15 @@
#!/bin/bash
curl_(){ curl "$@"; }
curl_() { curl "$@"; }
mktemp_() { mktemp --tmpdir aruppi-jobs.XXXXXXXXXX "$@"; }
echo "querying artist..."
artists_file=`mktemp`
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`
themes_file=`mktemp_`
echo " querying $artist_id info"
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/artists/$artist_id" > "$themes_file"

View File

@ -1,9 +1,10 @@
#!/bin/bash
curl_(){ curl "$@"; }
curl_() { curl "$@"; }
mktemp_() { mktemp --tmpdir aruppi-jobs.XXXXXXXXXX "$@"; }
echo "querying lastEpisodes..."
last_file=`mktemp`
last_file=`mktemp_`
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/lastEpisodes" > "$last_file"
for episode_id in `jq -r '.[][] | .id' "$last_file" 2>/dev/null`
@ -15,7 +16,7 @@ curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/lastEpisodes" > "$last_file"
for title in `jq -r '.[][] | .title | @base64' "$last_file" 2>/dev/null`
do
title=`echo $title | base64 -d`
info_file=`mktemp`
info_file=`mktemp_`
echo " querying $title info"
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/moreInfo/$title" > "$info_file"

View File

@ -1,19 +1,20 @@
#!/bin/bash
curl_(){ curl "$@"; }
curl_() { curl "$@"; }
mktemp_() { mktemp --tmpdir aruppi-jobs.XXXXXXXXXX "$@"; }
for recurso in movies ovas specials tv
do
for tipo in default updated added rating title
do
echo "querying $recurso $tipo..."
res_file=`mktemp`
res_file=`mktemp_`
curl -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/$recurso/$tipo/1" > "$res_file"
for title in `jq -r '.[][] | .title | @base64' "$res_file" 2>/dev/null`
do
title=`echo $title | base64 -d`
info_file=`mktemp`
info_file=`mktemp_`
echo " querying $title info"
curl -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/moreInfo/$title" > "$info_file"

View File

@ -1,17 +1,18 @@
#!/bin/bash
curl_(){ curl "$@"; }
curl_() { curl "$@"; }
mktemp_() { mktemp --tmpdir aruppi-jobs.XXXXXXXXXX "$@"; }
for day in monday tuesday wednesday thursday friday saturday sunday
do
echo "querying $day schedule..."
sched_file=`mktemp`
sched_file=`mktemp_`
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/schedule/$day" > "$sched_file"
for title in `jq -r '.day[] | .title | @base64' "$sched_file" 2>/dev/null`
do
title=`echo $title | base64 -d`
info_file=`mktemp`
info_file=`mktemp_`
echo " querying $title info"
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/moreInfo/$title" > "$info_file"

View File

@ -1,14 +1,15 @@
#!/bin/bash
curl_(){ curl "$@"; }
curl_() { curl "$@"; }
mktemp_() { mktemp --tmpdir aruppi-jobs.XXXXXXXXXX "$@"; }
echo "querying themesYear..."
years_file=`mktemp`
years_file=`mktemp_`
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/themesYear" > "$years_file"
for year_id in `jq -r '.[][] | .id' "$years_file" 2>/dev/null`
do
themes_file=`mktemp`
themes_file=`mktemp_`
echo " querying $year_id"
curl_ -s "https://aruppi.jeluchu.xyz/apis/aruppi/v2/themesYear/$year_id" > "$themes_file"