diff --git a/makefortune.sh b/makefortune.sh index d8c8f30..8521831 100644 --- a/makefortune.sh +++ b/makefortune.sh @@ -16,15 +16,15 @@ CURLURL="https://vocadb.net/api/songs?songTypes=Original&afterDate=${AFTERDATE}& echo "CURLURL: $CURLURL" DATA=$(curl -X 'GET' \ $CURLURL \ - -H 'accept: application/json') -DATE=$(echo "$DATA" | jq -r '.items[0].publishDate') -echo "DATE: $DATE" + -H 'accept: application/json' | tr -d '\000-\037') # making sure there are songs to add. -SONGS=$(echo "$DATA" | jq '.items | length') +SONGS=$(echo "$DATA" | jq -r '.items | length') if [ "$SONGS" -eq 0 ]; then echo "Result is empty. No more songs." exit 0 fi +DATE=$(echo "$DATA" | jq -r '.items[0].publishDate') +echo "DATE: $DATE" echo "{\"lastDate\": \"$DATE\"}" > var.json # looping the api to get all songs we need. while true; do @@ -32,7 +32,7 @@ while true; do DATA=$(curl -X 'GET' \ $CURLURL \ -H 'accept: application/json') - SONGS=$(echo "$DATA" | jq '.items | length') + SONGS=$(echo "$DATA" | jq -r '.items | length') if [ "$SONGS" -eq 0 ]; then echo "Result is empty. No more songs." break diff --git a/tetofortunes b/tetofortunes index 60c3f00..287b430 100644 --- a/tetofortunes +++ b/tetofortunes @@ -221270,3 +221270,19 @@ http://www.nicovideo.jp/watch/nm3522506 ▼・ᴗ・▼ % +TETO SONG OF THE DAY! + +Kikoe feat. 重音テト -- Sloth + +http://www.nicovideo.jp/watch/sm46218538 + +▼・ᴗ・▼ +% +TETO SONG OF THE DAY! + +mlmtr(みりめーとる) feat. 重音テト -- 20周年 + +http://www.nicovideo.jp/watch/sm46218113 + +▼・ᴗ・▼ +% diff --git a/tetofortunes.dat b/tetofortunes.dat index 953db87..5f94b08 100644 Binary files a/tetofortunes.dat and b/tetofortunes.dat differ diff --git a/var.json b/var.json index a323f75..9023d85 100644 --- a/var.json +++ b/var.json @@ -1 +1 @@ -{"lastDate": "2026-04-23T00:00:00Z"} +{"lastDate": "2026-04-24T00:00:00Z"}