Thursday 31 May 2012

Cron Script for Karma plugin

In my last post, I wrote about the integration of Karma Plugin for Connect, with Bugzilla. Since then, I have progressed onto developing a cron script for the plugin which fetches user activities from various sources like Bugzilla, Twitter, Planet OpenSUSE etc and calculates score based on that . So now, Karma details are  fetched for every user on Connect regularly and stored in the database.

Previously, details were fetched on every view of the widget, which was a gross mistake on my part and my mentor Michal suggested that rather than fetching details on every view of the widget, some caching would be a better idea.

The best solution to that was coming up with a cron script. That solved out two purposes, one, karma details could now be fetched from the database, so there was no need to make a call to Bugzilla or other sources on every view of the widget, second, we always wanted score to be calculated on a regular basis rather than only when the user logged in, so we needed a cron script anyway :)

I am still thinking of other sources that I could use for fetching karma details apart fron Twitter, OBS, Planet OpenSUSE and Bugzilla. If any great idea stikes you, do let me know, I'll be most happy to incorporate it. 

Saturday 26 May 2012

Integration with Bugzilla Complete!

After my last post, I worked on the integration of Karma plugin with Bugzilla. Karma plugin now assigns to users of Connect, Karma points based on the severity of the bugs they fix. And that's not it, you get a  "Bug Squasher" badge for attaining a  high score.

The best part, Bugzilla uses the same email id for registration that users register themselves with on Connect. Extracting a list of resolved bugs by a user linked with the email id of user on Connect was pretty simple :)

Others on the list are integration with Twitter for tweets about OpenSUSE, OBS activities, planet opensuse posts. I plan to distribute karma based on user activities on these, but I would really encourage people to come with ideas and let me know if I could use other sources too, to assign Karma points. 

Sunday 20 May 2012

Coding period starts!

I have finally started working on my GSoC project now, that is the Karma plugin for OpenSUSE Connect. Since Connect is developed under the Elgg framework, hence, my project requires me to work with Elgg.
Elgg which is extremely powerful(which i realize now :) ), is totally new to me.
Still stuck up, trying to figure out why the plugin displays default Elgg icons on calling getIcon(), even when I try registering plugin hooks for entity:icon:url or using the setIcon() method to change the default url for locating entity icons!
Time to hurry up now, I guess.