I started looking into evolution-data-server today, to look what we could use in Project Soylent (actually, I shouldn't blog on it because we don't want any noise on it yet :-)). The result is some code that can dump all your address books, or only dump some of the contacts using a filter string.
Because libebook is very poor documented (unfortunately, even the API docs aren't complete) I tried to document the code as good as possible. Please review it, let me know when some things are not well documented, or I just make dumb mistakes in the code :-D
The last version I made is here.
Compile it using
gcc -o evo-addressbooks-test2 `pkg-config --cflags --libs libbonobo-2.0 libebook-1.2` evo-addressbooks-test2.c
Dump your address books using
./evo-addressbook-test2
or use a filter string as first argument. Beware: you should Bash-escape the argument!!!
A sample of this:
./evo-addressbooks-test2 "(contains \"full_name\" \"John Doe\")"
will list some properties of the entry which has "John Doe" as it's full name.
I hope I'll be able to hack on this some more, and also hope we'll get a good view of what Soylent should become soon :-)
It'll be a great oportunity to learn some more aspects of Gnome coding, like GTK/Glade, Bonobo (|-|) and others.