Hour registration using ImageMagick

By Ghost on Thursday 2 July 2009 20:21 - Comments (5)
Category: General tricks, Views: 15.943

For my work I have to provide weekly work slips stating the exact hours I have worked in order to get paid. For this, I am required to use an existing template in pdf format which I have to print, fill in, sign and mail, fax or e-mail back to HQ. At the office, my supervisor has to check and sign the document before forwarding it to the payroll company by fax. I can imagine that at the payroll company the form is yet again converted to dead tree format, before being copied into their own system by an accountant.

Apart from the unnecessary paper and ink that goes to waste every month, I found the whole process I had to go through every week a bit too time consuming. I have to retrieve and print the pdf form, find a pen to write with, fill in the form, sign it, scan it back in (and scale back the image so it won't be a whopping 3MB jpeg), and mail it to my supervisor. After three times going through this whole process, I had enough and wrote a Python script that would assemble a complete form for me using ImageMagick.

Read more »

Eetlijst.nl vanaf de cli nl

Door Ghost op zondag 11 januari 2009 18:56 - Reacties (8)
Categorie: General tricks, Views: 5.494

In ons studentenhuis gebruiken we de website eetlijst.nl om de administratie rondom het eten bij te houden. Op een dood moment besloot ik mijn python-vaardigheden wat op te vijzelen en heb een script gebouwd om vanaf de cli dit overzicht op te vragen.

Lees verder »

Per contact custom SMS sounds in Symbian

By Ghost on Thursday 28 August 2008 15:59 - Comments (8)
Category: General tricks, Views: 5.213

A little over two months ago, I thought it was time to enter the era of the smartphones. After careful consideration I eventually decided to get myself a Nokia N95, which has not let me down since... as long as it was charged. The pim functionality is adequate, gps works as long as you manage to get a lock and it plays my music and podcasts perfectly. It even came with a snazzy headset - yeah, I know, I have low standards in that regard.

However, there was one thing bothering me: although Symbian, the OS running on my phone, is perfectly capable to select different ringtones per contact, it cannot do the same for incoming sms messages. For me, reading sms messages in general has quite a low priority and when busy, I am often not inclined make a run for my mobile whenever I hear an incoming message. I am, though, very interested in sms messages from certain contacts (for example from my girlfriend or my parents). It would be excellent if I could distinguish these high priority messages from the general, less pressing ones. Time to go to the proverbial drawing board.

Read more »

Kickstarting the PyS60 bluetooth console on Ubuntu

By Ghost on Monday 11 August 2008 17:59 - Comments (2)
Categories: General tricks, Linux, Views: 4.325

Recently, I discovered that there was a Python scripting engine for the Symbian OS, called PyS60. Given my interest in the programming language, I gave it a try. Using the instructions on the Nokia wiki, I had an installation up and running within the general lifespan of a cup of tea. There was only one feature giving me trouble: the bluetooth interactive console. Getting that to work under Ubuntu proved to be hard to figure out, but in the end easy to solve.

Read more »

Cleaning up version-controlled directories

By Ghost on Sunday 1 June 2008 18:26 - Comments (2)
Categories: General tricks, Linux, Views: 4.124

When writing LaTeX documents, you often end up with all kinds of redundant files. These files are generated during the compilation of a dvi or a pdf document and can generally be discarded afterwards. Most of my tex documents are under version control and, consequently, it is possible to get a list of the files that are (and are not) under this control. Using a single Bash command, you can abuse subversion to determine which files you want to delete:

rm -i `svn status | awk '/^\?/ {print $2}'`

Read more »