Any interest in a command line interface for Wanikani? I could easily make commands for any of the API endpoints.
I’m not sure if there is a use case for this. Maybe someone out there wants to write batch scripts or an electron app or VSCode plugin or something. Obviously you wouldn’t use a CLI to do reviews, but maybe you could set it up so that whenever you open a terminal it tells you how many wanikani reviews you have, or something like that. Might be a dumb idea but I figured I’d throw it out there to gauge interest
I’d be interested in a shell script that dumped performance stats, with various options.
I’m thinking, an option to count only last day, last week, last month, etc.
An option to count only kanji, vocab, radicals, or some combination of those
And then breakdown chart options, like time of day, item type, SRS level.
Example:
$ wkperf -t last_week -i all -b srs
Performance data for last week
All item types
By SRS level
Apprentice 1: 40 items tested, 37 correct, 92.5%
Apprentice 2: 40 items tested, 38 correct, 95.0%
[etc.]
.
.
.
Total: [totals]
$
Breaking down by hour of the day the review was done is pretty interesting sometimes. I feel like I do way better first thing in the morning. Does that data support that?
Or maybe if there’s a way to get a single item’s performance history:
Okay I threw something together. Right now it just lists reviews. It doesn’t follow any of the best practices for a client or anything like that, but it’s a starting point if anyone else wants to fork it and mess around with it. I used the generated typescript code from @MainLoop with some modifications (it didn’t compile out of the box).
Just a few fields are printed in the table now but it could be changed if anyone picks it up.
Same link as before, but here it is.
You can build it from source if you have npm installed with “npm install && npm run build”. Then you can do “npm link” to install it as a CLI. After that you can do “wanikani” to get the basic help. You can save your token in a profile on disk (there is a way to use windows credential manager too but I didn’t do it for this POC) with a command like “wanikani profiles create wanikani default --token abcdef123”. Or you can specify it on the command with --token abcfwioj123. or you can set the environmental variable WANIKANI_CLI_TOKEN.