Tag Archives: import

bbdb (and charrington): Or is it charrington (and bbdb) … ?

It was hard for me to decide who gets top billing today, since bbdb was the title I was chasing, but I didn’t get too far without charrington. On the other hand, charrington isn’t specific to bbdb, even if it did make bbdb a lot more useful.

I should explain. bbdb is a rolodex-ish address book utility for emacs. I understand it has a 13-year history and has quite a few provisions for specific address details.

2014-08-21-6m47421-bbdb-charrington

It installed fine, required only two lines in my .emacs file and seemed to be working fine with M-x bbdb. Unfortunately, I had no addresses in my .bbdb file, so as you can imagine, I didn’t get far.

Enter charrington, which extracts contact information from a GMail account (GMail users will probably pay attention now). Ideally it exports to a .bbdb file, but can supposedly handle mutt format too (mutt users will probably pay attention now).

charrington took only a few minutes to figure out. It needed python2-gdata from the Arch extra repo, and would run from python2.7 charrington.py.

Next, I copied the example charrington.conf file to ~/.charringtonrc, edited it to include my GMail account name (not full address, so just k.mandla, not with the at-gmail-dot-com) and plain-text password. Yes, I know, it’s plain text, but I figure I’ll only use it once or twice.

Then I ran charrington again with python2.7 charrington.py -g >> ~/.charringtonrc, to get the URLs for each group of contacts. I edited the .charringtonrc file one more time to make the URL list match the configuration file’s style, and then finally, python2.7 charrington > .bbdb.

That was it, really. From there, I could search the address file from within emacs, and as you can see, it works much better when you have a few names to skim through. … O_o

I’m ashamed to admit that beyond searching and getting back results from bbdb, I don’t have anything to show. If there are ways to add, edit, delete or otherwise wrangle the database, I didn’t look for them, mostly because I spent most of my time wrangling with charrington.

Importing an existing list of contacts was more important to me though. I know it’s not the fundamentals, but knowing the emacs brigade, I have a feeling editing the database is really just opening it in emacs, and … editing the database. 🙄 And if it’s not, it should be. … 😯