WaniKani scripted userbar?


#1

This is just an idea, not something I can do (atleast now), but if anyone can come up with it, it’d be pretty awesome.

So, basically I go to many forums and I keep signatures. I personally would love to have something like a WaniKani userbar like this : 



(The design could be better but I just made it within 5 mins)

The script part comes where the userbar keeps track of your level in WaniKani. So, a website where you enter your API, generates the userbar then.

Any ideas?


#2

Fun idea! I’ll see what I can do. You should post a blank version of the image you’d like to use, too.


#3

Sorry for the delay, this got held up a bit. You can create your user bar here. The image will be regenerated every day at midnight (if you’ve leveled up), or you can force update it by resubmitting your API key at the above link.



If you have design ideas for the background image/fonts etc., let me know!


#4

 


#5

Oooh cool! But will we always be apprentices? I think it would be better if it said our level category (i.e. pleasant, painful, death, hell…). Now to change my sigs!

 :-)


#6
EskimoJo said... Oooh cool! But will we always be apprentices? I think it would be better if it said our level category (i.e. pleasant, painful, death, hell...). Now to change my sigs!
Thanks! And I agree - the current design simply conforms to the image tyson provided. Level categories is an interesting idea, though they change only rarely; would you prefer over the Sect title?

#7

I second the Sect name :smiley:


#8

Ah yes! Sect would be best, even though most of us are ordinary turtles.


#9

That would be awesome(the sect name), though and I am an extraordinary turtle.


#10

Okay, I remade the userbar image to remove the static text so it can display your Sect. If you’ve already made a signature, please note you’ll need to manually resubmit your api key again in order to auto-update your level/sect information in the future, as I had to make some changes to the backend.

Right now Kanji characters won’t render though, if anyone is familiar with getting unicode (for the Kanji) to encode with imagettftext() then let me know, I haven’t been able to find much on that online.


#11

Mine updated on its own!


#12

I manually updated everyone who had previously made one, but that’ll just happen once ^^

Also, new users can generate images again, sorry for the downtime.


#13

Please add japanese fonts so my sect name can be displayed properly.



#14

Hi Satoshi, it got buried at the end of the last page, but I explain there why Kanji don’t render properly at the moment. I’m looking into fixing the encoding, and when I do your userbar will be updated to reflect that.


#15
kiko said... Sorry for the delay, this got held up a bit. You can create your user bar here. The image will be regenerated periodically to keep up with your levels, or you can force update it by resubmitting your API key at the above link.



If you want to update the background image or change fonts etc., let me know!
 Really good! Are you studying computer science or something?

#16
kiko said... Hi Satoshi, it got buried at the end of the last page, but I explain there why Kanji don't render properly at the moment. I'm looking into fixing the encoding, and when I do your userbar will be updated to reflect that.
 Ah, I see, sorry for not reading the whole topic. 

#17
kiko said..Right now Kanji characters won't render though, if anyone is familiar with getting unicode (for the Kanji) to encode with imagettftext() then let me know, I haven't been able to find much on that online.
 It should just be a matter of which ttf font you are rendering on to the image.   A quick glance at the WK style sheet says that WK uses "Helvetica Neue".


#18
Psycoder said...
kiko said..Right now Kanji characters won't render though, if anyone is familiar with getting unicode (for the Kanji) to encode with imagettftext() then let me know, I haven't been able to find much on that online.
 It should just be a matter of which ttf font you are rendering on to the image.   A quick glance at the WK style sheet says that WK uses "Helvetica Neue".

 Actually, Helvetica nor Helvetica Neue actually support Kanji. The current setting seems to be "Meiryo","Hiragino Kaku Gothic Pro","ヒラギノ角ゴ Pro W3","メイリオ","Osaka","MS PGothic" and "MS Pゴシック", but from what I've quickly looked up, it ain't relevant to kiko's problem as the font used and the PHP function he is using to render the image, "imagettftext", are different things. According to the PHP Manual's entry, it would be a question of either converting the input string using something such as the "iconv" module (got that from a comment) or as the entry suggests, "http_entity_decode".

EDIT : Also, a StackOverflow post that might help.

I could also be completely wrong since I don't have experience in PHP. Regardless, hope it'll help.



#19

Testing …




#20

I’ve updated the script again to support Kanji - thanks very much ekko for looking into that! I regenerated everyone’s images to ensure they’re correct.

@Juichiro Thanks! And yes, but more like the self studying we do for Japanese :wink: