Goobook

Overview

goobook is a great tool for querying your Gmail contacts from mutt. It's usable directly from mutt, or as an lbdb module.
NOTE: I have stopped maintaining these packages.

Goobook Debian packages

I've created some Debian packages of goobook for easy installation located here. Most of the requirements are satisfied by existing Debian packages. As of version 1.6, hcs_utils is no longer required as a separate package.

The source package files are now signed. You can verify them by importing my gpg key and running the command:

    dscverify --keyring ~/.gnupg/pubring.gpg \
        goobook_1.6-1_amd64.changes \
        goobook_1.6-1.dsc
    

2011/02/26: Add version 1.4alpha4 Debian packages.
2012/05/22: Add wheezy packages.
2012/11/10: Add version 1.4 packages. source packages now signed.
2013/06/01: During an upgrade to Wheezy, I accidentally disabled directory listings. Access to the goobook debs directory should now be fixed.
2013/08/10: Add goobook 1.5 and hcsutils 1.3.
2013/12/10: Add jessie versions. Fix "distribute" exception bug.
2014/07/02: Add goobook 1.6. hcsutils is no longer a dependency.
2015/06/04: I have stopped using goobook, so am no longer maintaining these packages.

Using from lbdb

First create a file ~/.lbdb/lbdbrc:

MODULES_PATH="/usr/lib/lbdb $HOME/.lbdb/modules"

METHODS="m_goobook m_inmail m_gpg"

SORT_OUTPUT=name
# SORT_OUTPUT=address

# So that "good" name/comment fields aren't hidden
# by garbage from m_inmail
KEEP_DUPES=true
  

Add whatever modules you want in addition to m_goobook in METHODS. The SORT_OUTPUT and KEEP_DUPES are optional - those are just my preferences. Then create a file ~/.lbdb/modules/m_goobook:

#!/bin/bash

# Use goobook to query google contacts
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/lbdb

m_goobook_query ()
{
    goobook query "$@" | grep -v '^$' | sed -e 's/$/ - goobook/'
}
  

The final sed appends "- goobook" to all goobook reponses, which is of course just my preference too.

To query lbdb from mutt, just add to your muttrc:

set query_command="lbdbq '%s'"
  
Last modified: Jun 04, 2015 14:25