Monday, August 4, 2014

Rmagick and Archlinux imagemagick HDRI enabled package.

Earlier versions of Rmagick will not compile with newer version of imagemagick with --enable-hdri compilaton flag.

The first recommandation would be to upgrade your library to the newest version (=< 2.13.3), but for some reasons sometime it is not possible yet.

If you are Archlinux user you'll probably end with an error message like :

Can't install RMagick 2.13.2.
RMagick does not work when ImageMagick is configured for High Dynamic Range Images.
Don't use the --enable-hdri option when configuring ImageMagick.

If you google a bit, you'll find the imagemagick-no-hdri AUR package.
Unfortunately is does not seem up to date.

I've tweak the PKGBUILD in order to bring a newer version of imagemagick-no-hdri

Installation :

Remove the base package :

sudo pacman -Rdd imagemagick

Download and build my no-hdri version :

wget https://raw.githubusercontent.com/Electron-libre/imagemagick-no-hdri/master/PKGBUILD

makepkg

Install the package :

sudo packman -U imagemagick-no-hdri-6.8.9.6-1-x86_64.pkg.tar.xz


Edit : I've made an Aurball, the new package is now available on AUR 

Thursday, June 19, 2014

OpenERP xmlrpc API for Ruby : Bintje

Few month ago, I released Bintje, a minimal interface to OpenERP's xmlrpc API:

It is available on github, as a ruby gem, and can be included in the ruby class of your choice ( as a Rails model for example ).

It still an early version, but is usable in production.

Why Bintje ?


So why it is named Bintje ? Because it is part of a bigger piece of architecture called "Barakafrites" which in french means this :
Yes, they sell "french fries".
Bintje is potato variety used for french fries (And have it's own dedicated character).

Now you clearly understand why this project is called Bintje ... ( Just kidding ... )

Using Bintje

First it needs OpenERP / OpenObject backend address, an example setup : Then create a Ruby Class, it could be Rails model if you want : This class inherits the CRUD basic methods, and have an example of custom method declaration.
You first need to include the module, once done your class will inherit module's class methods ( see documentation ), and gain the `open_object_model` class variable which is inferred from your ruby object name, but can be overriden as you can see in this gist above. And now you can query the OpenObject Backend and obtain a BackendResponse Object ( see documentation ) Yes it is so simple ... To get more methods, have a look to the documentation : http://rdoc.info/github/Electron-libre/bintje The behaviour specifications extracted from Rspec tests : https://github.com/Electron-libre/bintje/wiki