Notes about open source software, computers, other stuff.

Month: May 2010

A new job in genetic epidemiology

Last week I started my new job as a researcher in the field of genetic epidemiology at a university hospital in the Netherlands. Working for a UNIX consultancy firm for some time was a lot of fun, but being back in science is even more fun!

My job will keep me occupied with system administration of the servers used for genetic computations, improving several genetics packages for the programming language R, including getting them adapted to multi-CPU environments, and, maybe later, even try to get those calculations done on graphics cards (GPGPU computing/CUDA). And, of course, I need to get up to speed with genetics and epidemiology, and the math involved, as quickly as possible :-). So, no physics involved here, but who knows where this will bring me. And so far it’s been a lot of fun!

Related Images:

Script that converts a Squirrelmail address book to vcf format

Today I installed Roundcube as a replacement for my Squirrelmail webmail setup. All went well, but Roundcube only accepts adresses in vCard format (.vcf-format), whereas Squirrelmail only exports in CSV format. To solve this I wrote the following script that converts a Squirrelmail address book to vCard format. The results are sent to stdout, so run it like this: abook2vcf.awk user@example.com.abook > my_addresses.vcf.
On my Debian install the Squirrelmail address books (files ending in .abook are located in /var/lib/squirrelmail/data.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/awk
#
# This script converts a Squirrelmail address book to 
# vcards for import in Roundcube for example.
BEGIN{
    FS="|"
}
 
{
    full_name  = $1;
    first_name = $2;
    last_name  = $3;
    email      = $4;
 
    print("BEGIN:VCARD");
    print("VERSION:3.0");
    printf("FN:%s\n", full_name);
    printf("N:%s;%s;;;\n", last_name, first_name);
    printf("EMAIL;type=INTERNET;type=HOME;type=pref:%s\n", email);
    print("END:VCARD");
}

Related Images:

© 2024 Lennart's weblog

Theme by Anders NorĂ©nUp ↑