iOS auto updating kanji wallpaper (new and improved)

Hello! I just recently came back to wanikani, and reset to level 1. One of the tools I had built long ago was a Siri shortcut to set my wallpaper to a grid of wanikani kanji and their current SRS level. I’ve updated it to fix the bugs that have cropped up, and dramatically improved the installation experience for non technical users.

Example:

You simply add the shortcut via this link:
https://www.icloud.com/shortcuts/9b19cd8186a241ef81f1dbd766e1cf84

Answer the questions (it’ll ask for your api key, and which wallpaper you want to set)

Now whenever you want to update your wallpaper, you can run the shortcut and it’ll pull your progress. I have it set to run when I close Tsurukame.

Hopefully it motivates you!

Edit: the link has been updated to incorporate the change suggested by @Tomacho! Thanks!

8 Likes

To adjust the top and bottom insets, edit the shortcut, expand the “run with parameter” section, then replace “54” and “34” with the desired insets (in display independent pixels)

Note that the background DOES NOT UPDATE IF NO KANJI SRS HAVE CHANGED. If you would like it to, either do some reviews or change the “false” in the first line of the script to “true” and it will always update the image.

Interesting… I might give it a try (but first I need to get out of vacation mode and do all of my delinquent reviews :weary:)

1 Like

This is amazing, I love it. Thank you!

2 Likes

I am getting:

Unless I edit it to manually enter the API key.

And after doing so it spits out the no output box and doesn’t seem to do anything to the wallpaper. Any ideas? I tried setting the override to both true and false, both scenarios do nothing.

I’m on an iPhone xs max - software is fully updated.

Hmmm. Could you delete and reinstall it? Make sure you paste in the api key cleanly when it asks, and that you answer all setup questions.

The script updates the wallpaper but it does not switch the wallpaper to be the active one.

And make sure it’s a v2 api key. I recommend making a new separate key for this background generator.

I am getting this same error as mentioned above


. The only setup question I am unsure of is which wallpaper to overwrite — I have tried both manually selecting the only wallpaper I have or just hitting Next and either approach gives me the same error. I am not sure what the commenter above meant by entering the api token manually because I don’t know where to enter it.

I have created a new key for this but have no idea if it’s a v2 api key because I do not see any options for key version.

The bad thing is I had it halfway working earlier (the Home Screen was just black, but the Lock Screen was working) but started over from scratch because you had asked if I was sure I used the updated version since I’d posted about my minor trouble in the wrong thread. But now it won’t work at all since I can’t get past this error.

I’ll give that a shot - something seems off with my wallpapers as it only gives me the option to choose specific ones. That could be the issue. Will report back!

I’m sorry this will probably not be very helpful, but I had the same problem. I re-entered the api key, problem stayed the same. I hit the play button to run and after like, four attempts, it just started working.

I even re-installed it afterwards to try to reproduce the error and solution, but it just ended up exactly the same. Same error, no changes made (what I can tell, except i re-entered the api key) and then it started working after hitting play (run script thingy) several times.

Yeah, I got hopeful and just kept trying to run it, but whatever magic it is you encountered didn’t show up for me. I wish I knew more about scripting to even decipher what might be going wrong here, but it’s all Greek to me!

Oh wait, are you on the free version? There’s a good chance it just doesn’t work if you don’t have all the characters unlocked

Nope — lifetime membership. And as I said, it half-worked for me earlier (worked on the Lock Screen but not on the Home Screen) but when I asked it was suggested maybe I used the old link rather than the updated one, so I started from scratch making sure to use the link at the top and now it doesn’t work at all.

I went back to the old version because it at least half- works. I don’t know what improvements I’m missing, but it doesn’t have the “undefined is not an object” error.

Sorry I wasn’t able to figure out what exactly was wrong. Hopefully the old version works well for you.

Yeah, it’s working fine. Thanks!

And I do see what you meant about the blur on the Home Screen — the black made it invisible until I tried it and it worked. Thanks a lot!

For what it’s worth, it worked for me on the free version and is still working now after starting the subscription.

Hello! Thank you for your great work, @maboesanman . I was able to fix the issue with the script. Apparently, the way variables are passed in shortcuts is different from how it’s done in scriptable, and they need to be directly referenced. Just with that, the problem is all sorted out. Thank you for the wallpaper, it certainly motivates me with every little progress I make.

For anyone using the shortcut, as @maboesanman already explain if you wan’t to change the distance between the top of the screen and the wallpaper or the bottom, you should change in the code the numbers in const top_buffer_points or the bottom_buffer_points respectively.

Link of the corrected shortcut
Fixed Icloud Shortcut

3 Likes

Thank you! I’ve updated the shortcut and the link in the main post.

1 Like

Just want to thank you for this wonderful thing you have made. It is a constant reminder, without it I’m sure I would’ve forgotten to do my reviews some days. Very motivating to see the background change :slight_smile:

1 Like

@maboesanman: This is sofa king cool.

To confirm, in case it helps others in the future, no write access is needed, so when creating a new API token none of the permissions need to be checked – correct? Shortcuts is also saying that a 3rd party app needs to be installed to run it.