update wanikani script

This commit is contained in:
Osman Faruk Bayram 2025-02-04 17:52:49 +03:00
parent 7c03363776
commit 7ccfbeb2a6

View file

@ -5,6 +5,20 @@
# curl -s -H "Authorization: Bearer 2da24e4a-ba89-4c4a-9047-d08f21e9dd01" "https://api.wanikani.com/v2/assignments?immediately_available_for_review=true" | jq '.total_count'
# lets store the output of the above command in a variable
wanikani_reviews=$(curl -s -H "Authorization: Bearer 2da24e4a-ba89-4c4a-9047-d08f21e9dd01" "https://api.wanikani.com/v2/assignments?immediately_available_for_review=true" | jq '.total_count')
echo $wanikani_reviews
get_wanikani()
{
wanikani_reviews=$(curl -s -H "Authorization: Bearer 2da24e4a-ba89-4c4a-9047-d08f21e9dd01" "https://api.wanikani.com/v2/assignments?immediately_available_for_review=true" | jq '.total_count')
wanikani_lessons=$(curl -s -H "Authorization: Bearer 2da24e4a-ba89-4c4a-9047-d08f21e9dd01" "https://api.wanikani.com/v2/assignments?immediately_available_for_lessons=true" | jq '.total_count')
echo "WaniKani: $wanikani_reviews reviews, $wanikani_lessons lessons"
}
main()
{
get_wanikani
# sleep for 30 minutes
sleep 1800m
}
main