Categories

Coding, Web design.

php

So it’s 2018 and Jikan is now 1 year old! MyAnimeList announce late 2017 that they’ll be working on fixing up their API but until then I’ll have Jikan running around. I have some plans for Jikan that need to be done, hopefully by mid-2018 or earlier, depending on college.

There are some things I’m still interesting in scraping off of MAL, here’s the list.

User Profile

Taking an example of my own profile;

There’s a lot of data available per user profile. The best part here would be their favorite characters, people, anime, manga and basic stats. The hardest part to extract here would be the user based “About Me” which is highly customizable. So this, I might consider parsing since MAL’s HTML source is already terrible enough.

Top Anime/Manga/People/Characters

These pages give you access to a paginated list of anime/manga/people/characters ranked by their popularity/favoritism by the community from #1 to the last ranking available. Tis a gold mine entry.

Anime/Manga/Person/Character Search!

The official MAL API already has this feature but it only returns the first page of results! It only allows simple string queries and requires user authentication for the API call to work, which is what Jikan is meant to over come. This has been a requested feature, so I’ll most likely be working on a parser for this in the months to come.

Extended Data for Anime/Manga

This has been in the prospect of Jikan since the beginning, but I’ve held off any other extended parsing other than characters/staff and episodes until recently as I begun making scrapers for Pictures, Videos & News related to the item. This trend will continue as there are more pages that consist of interesting data regarding an anime or manga. Especially the reviews page since this has the best data for sentient analysis and averaging of any show or manga.

Will be focusing on these 4 for this year! It takes time to mine pure data since scraping HTML off MAL means a lot of weird and round-about ways of doing things!

What a basic app utilizing Jikan would require would be data on any anime or manga, then furthermore on the characters and staff members. These 4 types of data are essential to any app for the masses and Jikan can now robustly cover any app developer in those areas.

Note: There is no doc available for this endpoint as of yet, you’ll have to play by the data responses.

without further ado

It’s been a year since I started on Jikan and half a year since the REST API went up. To get this out of the way – I’m immensely excited to announce that a complete rewrite of the Jikan PHP API has been completed. Making the API more:

Now what’s left is the rewrite of the REST API. I’ve selected Lumen as the micro-framework to handle Jikan REST requests. And that’s currently in the works as I wrap my head around the features of this framework.

But my excitement could not be held back and I really wanted to see the new API in action – spitting out nicely formatted JSON without any malformed sorts of data. I quickly set up a new endpoint using the old REST API code – producing a developers endpoint.

With these core prospects for the API being stable and robust, it’s time to focus on implementing more endpoints for scraping more data out of an anime, or the most required function – the search endpoint.

the success of this project

I’ve been contacted by a plethora number of developers regarding the usage/feedback/etc of this project. Everyone’s happy – I’m happy. There’s a working, easy to use API that can tell you anything about your favorite Japanese cartoon and I think that’s what matters the most.

The usage of Jikan has been very successful – there’s a thousand of requests spanned across of hundreds of clients daily. Here’s a small chart on the usage since we hit off back in May.

what’s in store next?

The next foremost thing that is going to be accomplished is going to be REST v2.0. This will be based on the Lumen framework and a much faster server – thanks to a friend of mine. The base endpoint would be api.jikan.me, instead of what we’ve now.

After that – I’ll see what’s next on the agenda.

oh by the way

Did I mention that Jikan is now available on packagist.org/composer? You can install it as a dependency in your PHP project as simply as: composer require jikan-me/jikan

JQuery has become one of our foundations of processing requests while staying on the same page. No refreshes, simple requests to your backend PHP scripts via AJAX and updating the DOM Modals.

But often times, we’re met with a minor setback that leaves us pondering for hours. This is the second time that its happened to me and I decided to do something about it – write a blog post (how convenient, am i right?).

Lets get started with your code jQuery event.

$(‘.some_class’).on(‘click’, function() { … });

This may work for the DOM that was given when your page loaded but it doesn’t do well for appended content. The fact that you’re possibly using .on for appending dynamically is half of your solution but there’s still one more step left.

The jquery event isn’t firing when I click on edit, unlike the DOM that’s added on page load.

Fortunately, there’s a really quick fix for this. You need to rewrite it as:

$(document).on(‘click’, ‘.some_class’, function() { … });

Apparently jQuery now reads the DOM off the document, where it’s dynamically appended. Unfortunately, I have no idea why the previous method doesn’t work.

I haven’t talked about what Stats:Extract is here before. So I’ll introduce it first. S:E, in short, is a PHP library that’s used to parse cs2d’s serverstats.html file & decode&parse cs2d’s userstats.dat file.

CS2D (http://cs2d.com) servers generate a statistic html page which has the design equivalent to a potato and henceforth this parses the data from it so any web developer would be able to implement it into his own design. The servers also have a userstats.dat which holds player rankings in ENDIAN coded format so it decodes that as well. But that’s not all! It even has the ability to get any server’s real-time data.

The recent update comes with bug fixes, script optimizations and changes. There is nothing now although. It’s been about half a year since the last update and I have a few more plans for the script till I put it in it’s final state.

The download: http://www.unrealsoftware.de/files_show.php?file=16081
The Github: https://github.com/irfan-dahir/stats-extract

And finally, a demo to summarize its potential: http://irfandahir.com/stats-extract/

I’ve finally got my own domain registered. It’s irfandahir.com. I’m still using freehost, just linked the name-servers. I wouldn’t need more for my own portfolio so a freehost works well.

I’ve done some updates. The website is now more interactive. Every single effect, apart from the fade-ins in the intro-panel at the top is done with pure CSS3, especially the new Project Viewer. CSS3 animation transitions are epic and I’m currently doing my work around with them.

For example, this is the header on hover. Those are two borders wrapped around the “r” and “f”. And the “” expand on hover as well. There are some alpha transitions as well. I did experiment around and this was the final result that looked appealing. It’s only available on the desktop mode however.

Here is the new projects viewer. The background of the boxes is the average color extracted from the image itself. On hover it displays the preview and download links(if there are any). The transition effect itself is pretty slick. I’ve been working with rotated boxes transformed boxes for it.
The old project viewer is still available as well. You can choose which one you’d wish to use from the little button on the top right of the project viewer. It was a bit of a hassle but I managed to get it done in pure CSS3. The new project viewer is default on desktops. However the old project viewer is the default and only one available on tablets. It’s a bit different for phones tho. The phone version has a horizontal slider for it. It’s a minimized version of the new project viewer.

I’ve minimalised the “about me” context a bit more. Although I’ve not shown most of the skillsets here but I’m planning to replace it with doughnut charts instead. It’d rather look more appealing. I’ll do that with CSS3 transform too.

The contact section has minor changes. I’ve changed the “You can only contact me once per day” text to the following with a link to my email if you press it so. The only reason for this is because since I’m getting host on a free account, the limit for daily directly emailing someone is around 15. And abusing it results in an account lockdown. Therefore I had to resort to putting up a database for it. After doing so I was met by bot advertisement spams so I decided to further lock it down. And I haven’t gotten a single bot message since then. So I’ve got that thing going for me. o.x

This is fairly pretty much it for now. I’m working on a few other client projects so I’ll update on those when I’m done with them.

Well, it has been quite a while since my last post. Which was infact about me working on a CMS. To be quite frank I sort of ditched that project, for now. Lots happened, one would be ditching windows xp (well, it’s still installed side-by-side with ubuntu) and fetching a developer’s based OS. All I can say is that Ubuntu is perfect.

It’s 5.21 in the morning and I’m still managing with new additions. So, what’s this post about? Well first off, it’s a fangirling post and second off, some new stuff I had to adapt to as a web developer.

This is one of the projects I’ve been working on. It is quite bigger than my CMS project. Rather than storing the theme links and information in configuration files and parsing it from there, this is directly done from the database via mySQLi.

A thing about Ubuntu I love is the mass amount of virtual desktops you can create. See all those tabs in the task bar? They’re all OPEN. Except on a different desktop. I can switch desktops easily as Alt + (left/right or mouse scroll).

Another best thing is the light weight LXQT Desktop feature. It’s still in alpha phase as of my writing but it’s still modifiable and I’ll be using this forever probably. Note: I’m running on an old potato with 512mb ram with these features. I’m quite amazed. This is probably the most normal reaction for a windows -> ubuntu migrating individual.

Instead of using phpmyadmin, I’ve taken a step forward and am doing mostly everything from bash command line. It’s easy to adapt to and quite fun.

One thing I had to adapt to was file paths and the permissions stuff. They’re easy once you get to understand them but one thing with requiring/including files in PHP is that you have to do them from the base.

You can’t include a file like this: <?php require ‘core/framework.php’ ?>

Well, it has been a while since my last update due to some unforeseen circumstances (laptop got #rekt lol). This shall be my first update since then. The way my portfolio was currently was the epitome of a mess. Fonts lingering over 3~ MB in download size which were killing the user’s bandwidth as well as some parts of the design being a bit off. And of course, some backhand left un-done.

In the time being of a few hours I managed to re-gift the portfolio a sense of design and patched up some ends. I still haven’t worked on the administration panel, but who cares about that, it’s not like anyone else other than me requires it.

Some design changes included the navigational area as well as the fixed avatar of myself I had. That and the introduction area. I removed that and added a context of my awesome name with a crap ton of padding plus a slide down link towards the portfolio.

The portfolio was already almost finished last time. This time I just added a better download backhand to keep track of download hits as well as the counter showing in on the button. The icons are now to the left of the text.

The ‘About Me’ section is pretty much the same, except I increased the percentage in my visual skill set levels. lawl

Other than that I pondered a good 20 minutes on the submit button for the contact area. The button style was making me cringe so I suppose this one might as well be ‘The One’ currently…hopefully.

I suppose that’s it.
Oh, did I mention I got a new theme for Sublime Text? I swear this makes everything I write significantly even more beautiful. *~*