Pavol Rusnak #cypherpunk #hacker #openhw #privacy #bitcoin #newmediaart

Convert PyQt4 Applications to PySide


I just noticed (little bit late, but better later than never :-)) that PySide has become an official part of the Qt Project.

Thus I decided to rewrite all my PyQt4 applications to PySide. There are couple of options how to make your code to work with both PyQt4 and PySide, but in my opinion this adds a lot of cruft to the source code and there’s no reason to stay with PyQt4 so most of the systems will migrate to PySide in the near future. If you want to learn about these options anyway, consult the Supporting Both APIs section of the Differences Between PySide and PyQt at Qt wiki.

This document has also been a very helpful source of information for my simple script that converts your code from PyQt4 API to PySide. Please note that it’s not a 100% fully automated conversion, just a bunch of simple replacements and a scanner for problematic API usage like using QString, QVariant or the return value of QFileDialog methods. I am releasing it because I still do think it’s quite helpful and covers most of the cases.

Grab the source on github and of course you are welcome to send your patches/pull requests. :-)

Timelapse video with webcam and mplayer

Some time ago I created a timelapse video using webcam and mplayer:

Today I was asked how I did it and because I did not remember exactly the command line options I decided to write this post to save you some time reading manpages.

First step is to grab series of JPG images from mplayer using webcam:

while true; do
  # grab one frame from webcam and save it as 00000001.jpg
  mplayer tv:// -vo jpeg -frames 1
  # rename 00000001.jpg to something like 1344271221.jpg
  mv 00000001.jpg $(date +%s).jpg
  # sleep 1 second
  sleep 1

Once we are done (break the script with Ctrl+C) we can play the sequence using:

mplayer mf://*.jpg

If we are satisfied with the result we can convert these images to video using mencoder (usually located in the same package as mplayer):

mencoder mf://*.jpg -ovc lavc -o out.avi

For more options about creating video or video formats please read mencoder manpage, but lavc output should be OK for most of you . :-)

See you soon!

Hello everyone!

Today is my last working day at SUSE. I spent wonderful five and a half years at this company. First starting as a package maintainer, learning more and more about the free software movement and its ecosystem. Later I moved to the newly created openSUSE Boosters Team, where I could apply everything I learned about FOSS communities in practice and help to create the best Linux distribution.

Recently I discovered my dormant passion for open hardware, be it analog or digital. I feel that’s where my heart is at the moment and that probably I could do a bigger change in this area.

The good thing is nothing changes from the community side of things. I’ll still be participating in openSUSE development and discussions on the mailinglists or IRC. So, please, put the champaigne back to the fridge, it’s not over yet. :-) If you want to keep in touch and didn’t notice I started using email address instead of the corporate ones some years ago, please change your address entries now.

I’m sure we’ll see each other very soon at some FOSS related event (most probably openSUSE Conference in which organisation I’m actively participating in). That’s why this blogpost is titled “See you soon!” rather than “Goodbye”. And of course, remember to have a lot of fun!

Stabyourself games in openSUSE games repository

In previous blogpost I mentioned my first experiments with LÖVE framework for creating games. Today I found a website run by two friends called Stabyourself. They make games built on this framework and these are simply fabulous! Check out for yourself:

I was so psyched I created packages for all three of them. Simply add the openSUSE Games repository and install packages mari0, orthorobot or nottetris2 respectively to play. Dependency packages like love and lua will be installed automatically, of course.


Update: I was just notified that Not Tetris 2 does not work with LÖVE 0.8.0. I might try to look at it soon.

Emailplot - chart your email activity

Today I stumbled upon this fascinating article called The Personal Analytics of My Life by Stephen Wolfram. I immediately started to write my own script which produces the first chart in the article - daily distribution of sent emails. You can fetch it from my misc repo on github and play with it (requires ruby and rcairo). Output for my outboxes looks like this (red dots are personal emails, green ones are related to openSUSE):


I might implement other charts mentioned in the Stephen’s article in the future, but no promises. :)