Revisiting the Planet

We’ve been running our blog aggregation at lisas.de with a WordPress-based solution using the long-obsolete feed-pull plugin for ages. After receiving complaints that the cron hook for the plugin was pinging other hosts, I decided it was time to replace our aggregation solution (again).

So, welcome to the new LUGES Planet! We now have a few lines of Python (forked off of hugo-planet) to aggregate the blogs into Markdown using feedparser and render them to static HTML using the Hugo static site generator.

Pickeling Pixbuf Pixel Arrays

After lots of googling, I finally figured how to pickle a gtk.gdk.Pixbuf‘s pixel array. I was looking for a way to pickle a Pixbuf’s image data into a file easily. The original C API provides a dedicated interface for that, unfortunately the pygtk developers seem to believe that there is no need to support it with the Python binding. So I tried to get access to the image data through the Pixbuf’s pixel_array property. Unfortunately this will yield an unpickleable standard Python array instance if you import gtk only. If you also import Numeric (assuming you have it available) a call to get_pixel_array() will yield a Numeric array instance instead and Numeric arrays are very well pickleable.

Hopefully this will speed up other people’s googling.