Free Command Line Tool for AddressBook
I was trying to come up with a small gift to give you guys and gals for the holidays, so I dug through a bunch of folders and found a command line-based tool I quickly put together some time ago called abtool. It looks contacts up in the AddressBook database and displays them on the screen.In general, you do something like this:
./abtool smith
Which gives you something like this:
Joe Smith 408-555-1212 joe@smith.site
Bob Smith 408-555-2121 bob@smith.site
There might be other tools out there that do this, and the source is arguably more interesting than the tool itself. There's not much code, but it shows how to find contacts in the database using the AddressBook framework and display various bits of information about them. It also shows a basic example of how to read command line arguments in C and convert NSStrings to C strings and vice-versa.
Download abtool and source (58k)
Enjoy!
Free Command Line Tool for AddressBook
Posted Dec 25, 2005 — 7 comments below
Posted Dec 25, 2005 — 7 comments below
Cesar Tardaguila — Dec 26, 05 633
Adrian — Dec 26, 05 634
Scott Stevenson — Dec 26, 05 635
John — Jan 03, 06 640
I would be particularly interested in a version of contacts that allows one to create a person or group record in AddressBook. I could then write a CGI script to add newly created SquirrelMail contacts to AddressBook, as well.
rg — Jan 04, 06 641
Christoph — May 04, 06 1161
I hope you don't mind. Thanks again!
Philipp von Weitershausen — Oct 15, 09 6942