[Extension] WICS - WaniKani Integrated Custom SRS - Now with deck exports!

I just realized, that Koohi Café exports words in a csv format.


Neat

2 Likes


Slight update to the deck view page. It’s both more usable and it doesn’t take a second or two anymore to load in a deck with ~2000 items.

3 Likes

git tag? So that rolling back from Git is easy. Otherwise, use Release feature on Github.

Chrome Store is as slow as ever.

1 Like

I’d wager they aren’t slow, rather they actually manually check the extension and they don’t work on weekends.
I haven’t yet set up git tags, because tbh, for now I keep the latest version a working one (hopefully with a dev branch in the future), and didn’t yet have the drive to make releases.

1 Like

Anki support? It seems that Anki export is in TSV, even if the file extension is *.txt.

Anki export


README.md’s “Building from source” should mention editing vite.config.ts to browser: "chrome",.

Yeah, I just didn’t get around to it yet, I can make it happen the next time I get to the code if you want.

Indeed it should, I feel the same way about the place I took the project template from, yet they didn’t. I’ll include it quickly.
Done

2 Likes

Chrome finally checked 0.1.5.1, almost in time for the next release even

3 Likes

Almost made this a poll to choose a version, but then suddenly I remembered that I have a barely used options menu for exactly these reasons.

Decided to redo my csv importer a bit, mainly because turns out, it could be copy-pasted mostly for use with anki decks. But anki decks for sure don’t have headers for their fields, so it was kinda awkward trying to guess what each field was, while literally the first three all were そら.

So now there are 3 different options to solve this.
First, you can show 3 examples as the name of the field. This has the advantages, that you can very quickly identify what each field is, and usually 3 fields are plenty for figuring this out.
The disadvantage is that it’s god ugly.

The other two options are very similar. They both give a short, generic name to each field, but they also have a help text for them, that contains 10 examples for each field.
The advantages of this, is that you get way more examples, so even if the first 3 aren’t representative, you should at least have a chance to get a good idea of what the fields might be.
Also, it’s not as ugly.
The disadvantages are that you can’t directly see the examples, you have to hover over them individually, and if you want to compare two fields, to check which one you actually want, it might be a lot of flicking between them. (Hopefully the deck creator didn’t put them at opposite ends).
In practice, this doesn’t actually seem like a big issue, the human brain is wonderful, and you can guess the type of the field in a second or less.

The two types differ in how the examples are separated, the first one puts them onto “one” line, with commas inbetween:

This is great for very short fields, but less great for longer ones, like sentences or similar.
The other type separates the examples with new lines, making them line up vertically:

This is more annoying for short fields, but personally, this is my favourite of the three. I like clean things, and this is clean.

3 Likes

Oh right, also, forgot to mention, this also means, Anki import is there.

It’s using the text export, because I took a look at the alternatives and immediately pushed them out of my mind. So if you want to import a deck from ankiweb, you probably need to download it into anki first, then export it again into the text format. Maybe eventually I’ll actually care about this.

2 Likes

Sent in version 0.1.9 for review to both stores. Most likely by the time I finish writing this post, the firefox one will be already available, and the chrome one will be accepted somewhere between now and the heat death of the univers (hopefully).

Oh look at that, the firefox version is out. Didn’t even have to make an edit.

4 Likes

About Anki, probably there should be a tooltip inside the importer, that “Export format = Notes in Plain Text (.txt)”?

Also, Include HTML and media references?

APKG might be troublesome to import, but that would also includes media. Technically, it is a ZIP that has SQLite inside it.

Another trick to exporting is Filtered Deck, but that is probably outside the scope of the script.


Is it compatible with Extra Study? So far, imported items don’t come up in Lessons (always 0 so far), so Reviews (other reviews once).

Also, would it be compatible with https://www.wanikani.com/extra_study/items?ids=?,?,?, or some other APIs?

1 Like

I’m using that already, the other ones are beyond the scope of the extension for now

I think I would need to have the media hosted on some website which makes it impossible to use like that, but I need to Investigate this.

Right now it’s not. Eventually it will, but I’ll probably do wkapi integration first

1 Like

A way is to upload the files to web extension, then append to Wanikani during review using base64 data URI.

About uploading the files, I am not sure how much web extensions can do, but at least putting the content inside IndexedDB should be possible. (What form? Blob? IntArray? base64? Filenames might need to be stored in a separate field.)

Audio files are relatively big. Base64 takes this size and increases it by about 33%. It’s just way too much data, I’ll skip it for now, and maybe see what I can do later

So it seems Kindles have this interesting feature, that they collect all the words you searched for and checked out while reading, and then you can go in and learn them as flashcards. It would be really nice to import that in. Though it’s another sqlite file it seems, which sounds painful

1 Like

The Chrome web store still hasn’t updated past 0.1.5.1, so sorry if this has been fixed since then, but it seems that this breaks Reorder Omega, at least in lesson ordering. After adding a word none of my lessons are reordered, and I get this error in the console:

userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:169 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
    at userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:169:100
    at Array.filter (<anonymous>)
    at userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:169:48
    at step (userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:56:23)
    at Object.next (userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:37:53)
    at userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:31:71
    at c (wrap-function.js:56:21)
    at new Promise (<anonymous>)
    at new Promise (wrap-promise.js:83:21)
    at __awaiter (userscript.html?name=Wanikani%253A%2520Reorder%2520Omega.user.js&id=1fd0f574-ed98-46b3-a694-63025b668091:27:12)

(I’ve made a couple minor modifications to Reorder Omega so the line numbers might not be quite right)

It looks to me like WICS doesn’t define something Reorder Omega expects to be defined, but I don’t really know everything that’s going on so I’ll stop speculating now.

@Kumirei could probably correct me on this, but I assume what’s happening, is Reorder Omega is trying to get some level data or similar for the from wkof, but because it’s a custom id, it just fails. I’ll need to handle the whole wk api at one point, and this will probably be fixed during that, but until then the best workaround I can recommend is turning off the extension for the time being when you try to use reorder

1 Like

Kobo has something similar :eyes: I have an anki extension to automatically get them from my device

That sounds right. Omega works pretty much exclusively against WKOF data (since the queue is just ids)

Oh neat, I’ll have to check that out eventually then, would be nice to support most major formats.

1 Like