Archive for August, 2009

Filling the MP3 player before going on vacation

Thursday, August 6th, 2009

Isn’t your MP3 player brand new? Would you like to go on vacation with a bunch of music but don’t have enough space?

It’s quite common to buy high definition MP3 today, but they take too much space especially if you don’t need such high quality while having your sun bath.

Lucky enough, you are a geek, so you know what’s a bash script.

So, create you collection, copying your MP3s in a dedicated folder, then run the following command

find -type f ! -name '*.low.mp3' -exec ffmpeg -i {} -ab 128K {}.low.mp3 \;

It will create 128k MP3 version of your collection (converting the format, if necessary)
When done, just delete the high quality version

find -type f ! -name '*.low.mp3' -exec rm {} \;

and copy the remaining on your MP3 player.

Wish you good vacation!

Setting up FoodMart on Mondrian

Monday, August 3rd, 2009

I don’t know either if I’m stupid or if the Pentaho developers are lacking of effort in helping poor conference speakers like me.

If you want to show someone the features of something, you have to set up a demo. And half the times these demos require data. And if you are setting up a demo for a business intelligence tool, data is essential!

Pentaho provides you with a dataset to use in demos and as a playground (thank you), but it’s quite difficult to set it up. An early adopter may judge this as project immatureness, while Mondrian is all but immature!

That’s what you need to set up the FoodMart database on PostgreSQL before demoing Mondrian (don’t try that with MySQL: it will take hours!)

First, locate a copy of these dependencies: log4j, eigenbase-xom, eigenbase-properties, eigenbase-resgen, commons-logging and postgresql-8.4-701.jdbc4.jar (or a suitable postgres jdbc driver): let’s say you have them in folder “mondrian/lib” and that you are in folder “mondrian”

Then write in a console:

java -cp .:lib/mondrian.jar:lib/log4j.jar:lib/eigenbase-xom.jar:lib/eigenbase-properties.jar:lib/eigenbase-resgen.jar:lib/commons-logging.jar:lib/postgresql-8.4-701.jdbc4.jar
mondrian.test.loader.MondrianFoodMartLoader
-verbose -tables -data
-jdbcDrivers=org.postgresql.Driver
-outputJdbcURL='jdbc:postgresql://localhost/mondrian?user=postgres&password=postgres'
-inputFile=demo/FoodMartCreateData.sql

Then wait for a minute.

Bah, maybe it’s just me, too comfy sat on ant and maven.