Get contacts from LinkedIn, Google Plus, Ldap together with lbdb

02 October 2011
en and web2.0
 

As many people in internet era, I have contacts on various networks. Facebook, LinkedIn, GooglePlus, Work, Mail Agent, Phone… And I want to be able to contact all these people by mail. Unfortunately, It is a pain to go to the good website, find the directory, search for the mail address, and eventually copy and paste it in my mailer.

My Mail User Agent being mutt, I searched for a solution that would work well with it. I had a look at the add-ons for thunderbird but did not find what I am looking for.

I use lbdb (the little brother database). It is able to read a lot of different kind of address books, including Mac OS X’s addressbook, gpg keyring, vcf files and ldap directories. There is no specific module to access the facebook, linkedin or google databases. However, Google and LinkedIn both allow the user to download the directory of their contact as a vcf file (or other formats). I saved those files as ~/.lbdb/linkedin.vcf and ~/.lbdb/gmail.vcf. My configuration file for lbdb (saved as ~/.lbdb/lbdbrc) is as follows:

METHODS="m_ldap m_abook m_inmail m_gpg m_muttalias m_vcf"
VCF_FILES="$HOME/.lbdb/linkedin.vcf $HOME/.lbdb/gmail.vcf"
MUTT_DIRECTORY="$HOME/.mutt"
MUTTALIAS_FILES="~/.mail_aliases muttrc alias"
LDAP_NICKS="loria uhp"

My workplaces (loria and uhp) have a ldap server, which I configure in a ~/.lbdb/ldap.rc file

# -*- perl -*-

%ldap_server_db = (
 'loria' => ['annuaire.inria.fr:9009', 'dc=rocq-annu,dc=inria,dc=fr',
             'uid cn sn mail', 'uid cn sn mail ou l roomNumber telephoneNumber',
             '${mail}', '${cn}', '${ou} ${l} ${roomNumber} ☎:${telephoneNumber}'],
 'uhp'   => ['ldap.uhp-nancy.fr', 'dc=uhp-nancy,dc=fr',
             'uid cn sn mail', 'uid cn sn mail ou l',
             '${mail}', '${cn}', '${ou} ${l}' ]
);

Yes it contains a phone character (☎). Which spits messages such as

John.Smith@example.com	John Smith	B242	☎:12 3456 7890

What’s missing?

  1. Facebook. Obviously, as I cannot export my facebook contacts, I cannot feed them to lbdb.
  2. Google Plus. The contacts for which I have email addresses on Google Plus are those to whom I sent or from whom I received mails via GMail. Well, as I don’t want to share my email addresses to all people who have me in their circles, it seems reasonable.
  3. Auto-update. GMail and LinkedIn contacts don’t get updated each time I add someone. Too bad.

Note: Most of that can be done with many mailer (ldap and vcf files are accessible). If one solves point 3, it would be great.