[Userscript] Burn Manager (Review / Resurrect / Retire)

Upgraded to use Wanikani Open Framework

:point_right: [v2.0.0] - Converted this script to use Wanikani Open Framework.

Hi all… Burn Manager now uses the Wanikani Open Framework. Now, when you install Burn Manager, or when you update to this new version, you will be forwarded to a forum thread that explains how to install the Open Framework script. (Unless you already have the Open Framework installed, of course).

The Open Framework is an open-source userscript framework for simplifying the process of writing userscripts for Wanikani.

Works beautifully, like a freshly recharged お守り (charm). Thank you very much! ありがとうございます!

Just found this! I am so going to use this later! Installing now though =)

And yes, it is worth reviving this topic, let’s keep it alive! Another 12 months where it won’t get closed :wink:

1 Like

Threads in the third-party app section don’t close after 12 months. :slight_smile:

Oh! Didn’t know! Well, that IS a good rule! =D
Well, still worth showing my support though! =^_^=

1 Like

Yo @rfindley I tried using this script out as instructed with Chrome + TamperMonkey to resurrect a combination of 1000+ Burned Kanji / Vocab items and got rate limited hard. I don’t know the actual numerical rate limit but once exceeded, access to the WaniKani website itself was blocked seemingly every run attempt by a message like below for a minute or two (or until you disable the scripts).

{"error":"Rate limit exceeded","code":429}

I basically had to resort to resurrecting only Kanji one level at a time, and then switch to only Vocab one level at a time. I’d suggest introducing an option the user can check mark to induce a delay between each of the api requests you’re sending. I was going to manually add a setTimeout() somewhere, but… couldn’t figure out where to put it. :disappointed:

1 Like

Yeah, it’s a pretty old script. They didn’t used to have rate-limiting on the resurrect/retire URLs, but apparently they do now.

Doing timeouts and retries with Promises is a little tricky, but it can be done. It’s the retire() function’s .fail section that needs to be modified. Unforunately, I don’t have time to work on it at the moment.

2 Likes

:point_right: [v2.0.4] - Fixed after Wanikani update.

4 Likes

Hey @seanblue @rfindley : do you think it would be simple to adapt the burn manager so that besides “level” and “item type” criteria one can also use “leech factor”? If you think it is easy I will try to tinker with your other scripts to try to do this. I’m asking because I’m not very familiar with the open framework, so far the only change in a script I did was to change the color of the “ignore answer” button to almost invisible so I’m not very tempted to use it. Thanks for your feedback.

Leech factors (using my calculation) will generally be very low for burned items, so I’m not sure it’ll be that valuable. I don’t know anything about the burn manager script, so I have no idea how hard it would be to combine the functionality.

1 Like

Thanks for your answer. If I may ask another quick question. In the code below: incorrect / Math.pow((currentStreak || 0.5), 1.5);
I’m assuming || is the logical OR operator but I’m not sure what it does when applied to two numbers, does it gives the max, a || b = max (a,b) ?

If currentStreak is not defined, or defined as a value treated as false, then the other number is used

image

1 Like

Also known as falsy. :slight_smile:

3 Likes

Neat! Did not know of this term

2 Likes

Hi all,

I’ve been experiencing a bit of a bug using this script. I’m using wanikani on Firefox, and have installed the WaniKani Open Framework and reordered the scripts as instructed.

I am able to open the Burn Manager, and when I hit ‘Preview’ it is able to correctly find whichever items I ask for (e.g., burned kanji from certain levels etc.). However, when I then hit ‘Execute’, a banner pops up saying ‘Executing 0 / 0’, and then nothing happens. Below is an image of this happening.

Is this a bug, or am I doing something wrong? I’d appreciate any help! And please let me know if there is any more info I can provide to aid diagnosis.

First, check if there are any errors in the Javascript console (press F12 and click the Console tab).

If no errors, the next question: Are you sure those aren’t all resurrected already? The fact that it seems to think there is zero work to do sounds like it thinks they are resurrected already (if it’s not a bug). Try selecting “No change” instead of “Resurrect All” to see what their current state it. If they’re sort of faded, they’re not resurrected. If the colors are solid, they’re already resurrected.

Also, if you start with “no change”, you can toggle a few by clicking on them (preferably only toggle from faded to non-faded, which means “resurrect”), then do “Execute” to see if you still get “Executing 0/0”.

1 Like

Same here. macOS 10.15.6, Chrome, violentmonkey.

@ChillD @aneesh92,

:point_right: [v2.0.5] - Updated to support changes to SRS in Apiv2

3 Likes

Fantastic — this appears to have worked. Thank you so much rfindley!

It appears to work but at a limited capacity. It can’t change too many items at once. Wanikani gives this error right after:

{“error”:“Rate limit exceeded”,“code”:429}

I can see somebody else has mentioned this back in early 2019. Is this still a limitation from Wanikani? Can API v2 help mitigate this in some way? Like processing a batch that complies with the rate limit, then continue with the next batch and so forth? Thanks @rfindley