View Single Post
  #9  
Old 2010-08-19, 05:42
gkuenning gkuenning is offline
 
Join Date: May 2010
Location: Claremont (LA), California
Posts: 67
Thanks!: 4
Thanked 36 Times in 21 Posts
Send a message via AIM to gkuenning
Default Re: Reading contacts from command line?

Since I back up with rsync to my desktop and laptop, I have a copy of the DB on a machine that has db_dump. I found that "db_dump -p" gives a series of vcards encoded one per line. It wouldn't be hard to parse those further using a tool like awk or python.

Now that I think about it, Python has a Berkeley DB access library (bsddb), although I don't know if it's available for Maemo.

Jarkko, what kind of tool are you imagining? I.e., are you thinking "lookup_contact --home-phone Joe" would print out Joe's home phone number? (I'm thinking that if somebody writes a tool, it would be good to try to make it flexible so other people can use it in unanticipated ways.)
Reply With Quote
The Following User Says Thank You to gkuenning For This Useful Post: