diff --git a/modules/services/wanikani-fetch-data/wanikani-fetcher.sh b/modules/services/wanikani-fetch-data/wanikani-fetcher.sh index 5e7241f..d0a1cf8 100755 --- a/modules/services/wanikani-fetch-data/wanikani-fetcher.sh +++ b/modules/services/wanikani-fetch-data/wanikani-fetcher.sh @@ -24,11 +24,11 @@ fetch_and_merge() { -o "$resp_file" echo -e "\n--- Page $((counter + 1)) (First 20 lines) ---" - # head -n 20 <(jq . "$resp_file") - jq . "$resp_file" 2>/dev/null | head -n 20 + head -n 20 <(jq . "$resp_file") + # jq . "$resp_file" 2>/dev/null | head -n 20 next_url=$(jq -r '.pages.next_url // empty' "$resp_file") - ((counter++)) + counter=$((counter + 1)) done echo "Merging data..."