Michal Čihař - Blog Archives for SUSE

Adding API to Django application

One of Django applications I maintain is our internal tool used at SUSE used for managing incoming L3 requests. Recently request to add some API arose (read only for now). Looking at available solutions, I came to conclusion that django-piston should be the best choice for me.

Adding simple model based API with it is indeed quite simple, all basic information you need is written in getting started part of their documentation.

On the other side, things can never go without problems, so I was hit by well known bug. Fortunately fix exists, though it is not yet merged upstream. While digging so deep into problem anyway, I've submitted a request to include this patch in devel:languages:python OBS repo.

GePeS continued

Continuing on my Hackweek project, I've polished GePeS a bit today.

I started with better display of GPS coordinates and added some more GPS details to separate page. Adding images for moon phase was also part of the plan, though it force me to learn how to switch application to black theme, which looks much better with moon image.

Rest of time was spent on cleaning up the code and adding preferences (for now only refresh rate).

Updated screenshots:

Main screen Sun and moon screen Compass screen GPS details screen

PS: Some numbers look weird (altitude and speed), though I'm pretty sure this is what phone reports me.

GePeS - another hacweek project

With no clear plans for Hackweek this year, I decided to play even more with N950. As I quite lack some GPS application I decided to write it :-). The feature set will be based on things I would use, though I still think it will be useful for others:

  • Display basic GPS info (coordinates, speed, etc.)
  • Compass
  • Moon and sun rise and set calculations for current location

I've named the application as GePeS and you can find sources on Gitorious: https://gitorious.org/gepes

During first day I've managed to implement basic things, check screenshots:

Main screen Sun and moon screen Compass screen

StarDict dictionaries for openSUSE

While working on dictionaries for StarDict today, I've decided to finally bring them to openSUSE as well.

First step was to fix my favorite tool to access them - sdcv. The fixed package is now in my home project and will be hopefully soon accepted to Education project so that it is more visible (see request 69901 if it is already the case).

When I had the tool working, it was time to package dictionaries themselves. It was quite simple task and the rpms are available in my home project.

To install packages on openSUSE 11.4 simply do:

zypper ar http://download.opensuse.org/repositories/home:/Nijel:/stardict/openSUSE_11.4/ stardict
zypper ref
zypper in  stardict-czech  stardict-english-czech  stardict-german-czech

PPA for Debian

There seem to be lot of momentum in discussions about making Debian testing more attractive to users on debian-devel mailing list (see Lucas's summary for summary of the lengthy discussion).

One of the raised points there is that Debian misses equivalent of Ubuntu's PPA or openSUSE build service. As Debian is usually about do-ocracy, it will be there once it will be implemented, but I still don't think it is always useful to have such thing.

The problem with both (but this is especially the case for openSUSE build service) is that you need to add dozens of home: projects with questionable quality of the software. This usually leads to horrible mess, especially in case of incompatible libraries with different build options (anybody using wxWidgets?).

It can definitely lower barrier for people to create packages for the distro, but is it really good to lower barrier that much? I'd really prefer new things to be uploaded to Debian itself without need to use any external repositories, it would ensure at least some level of quality and compatibility with other packages.

New phpMyAdmin themes

Today, I've made available two new themes for phpMyAdmin on our demo server.

First one is Toba theme which was contributed by Azhari Harahap:

Toba theme

Second one is Graphite theme which I've started during Hackweek and finished during free time around FOSDEM:

Graphite theme

And we're still waiting for more contributions to our Theme contest.

PS: Forgot to mention that new themes are only for 3.4 branch and won't work with others.

phpMyAdmin improvements

As my Gammu Hackweek 6 project went smoothly, I've decided to spend some time today on phpMyAdmin as well.

My work was mostly inspired by (IMHO unfair) comparing of Adminer and phpMyAdmin. I could surely create similar comparing where would be dozens of things why is phpMyAdmin better, but I don't want to go that way and I rather decided to spend my time on coding.

First and easy task was bit which is in comparing described as "Status variables", where I've added documentation links, so phpMyAdmin now has both short executive summary and link to the official documentation. While looking at server status page, I've categorized some newly added variables, so they now appear in right place. I also reconsidered formatting of numbers and hopefully current solution will work for everybody and not produce contradicting bug reports like the old one.

Then I did focus a little bit on testing AJAX and fixed some minor issues, mostly affecting Chrome/Chromium browsers, because they are strict in case of some errors.

Last but not least I've added URL redirector inside phpMyAdmin, so no external links will now reveal what did user actually was doing in phpMyAdmin, but rather the url of the redirector.

And when speaking about phpMyAdmin, I need to mention one thing as well: contribute yourself! You don't have to be developer, there is currently ongoing themes contest and we're always looking for translators.

Gammu supports Symbian (and going for Android)

Hackweek 6 is over and my project is done - Gammu can now talk to Symbian phones. All the work is based on Series60 - remote applet. The changes on Gammu side were not just to implement new protocol, but also some more general improvements it enforced. I think the diffstat summary tells how much was changed:

166 files changed, 23126 insertions(+), 15738 deletions(-)

All code is is available in our Git repository and check documentation for information how to set it up. There will be testing release incorporating these changes next week to give broader audience chance to test it.

So now Gammu has long requested support for Symbian and we need other challenge. That seems to be Android right now and there are already two approaches which might help there. One of them is porting Series60 applet to Android, what is planned by Series60-remote author. There is also other promising way, where I can not share much details right now, but I can give you a little teaser:

$ gammu identify
Device               : 192.168.1.4 5210
Manufacturer         : HTC
Model                : unknown (HTC Nexus One)
Firmware             : FRG**
IMEI                 : **************8
SIM IMSI             : **************7

Yes, getting basic information already works for the developer working on it :-).

Installation of S60 applet to the phone using Gammu

I've (again) changed schedule of what to implement and I've spend fourth Hackweek 6 day by doing more cleanup and documentation work than real coding.

The major new feature is support for direct installation of the applet to the phone, so the installation is now easier. There were minor improvements on the both sides to allow support for calls and deleting of SMS messages. Adding calendar and todo entries is still left for future (hopefully tomorrow).

I've done (more or less) final cleanup of my changes in the applet itself and I've sent changes back upstream hoping for merging them (I'd give you link to the mail, but the archive does not work).

Rest of the time was spent collecting feedback from users testing the code (surprisingly there are already few brave users who gave it a try). It resulted in few bug fixes and improved documentation.

Last but not least - all code is is available in our Git repository and check documentation for information how to set it up.

Sending SMS on Symbian phone using Gammu

Third Hackweek 6 day went a bit differently than I planned, but there is still lot of progress.

I've added some more calls to the Series60 remote protocol, so that some things now work much faster (eg. getting number of contacts, calendar entries). The applet now also has a function to toggle Bluetooth so it does not have to be done elsewhere in phone menus.

On Gammu side I focused on messaging support, so now Gammu can list messages in the phone or send new message.

Modification of calendar entries is left for tomorrow, hopefully I will get to it and the support will be more or less complete and I will have Friday for final cleanup.

And as usual - all code is is available in our Git repository and check documentation for information how to set it up.