Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'System address book via shell?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
System address book via shell?
Authored by: marmoset on Jun 09, '03 12:51:57PM

What would be _really_ nice would be a command line interface (even read-only) to the system Address Book. I know Cocoa and Carbon apps can get to this data, it would be great if it were somehow exposed so that, say, shell scripts could get this data.

[ Reply to This | # ]
System address book via shell?
Authored by: macman13 on Jun 09, '03 01:09:30PM

The only way I can think of off hand is to have Addressbook export a vcard of all phone numbers. Then you could modify the script to parse all "FN:" and their associated telephone numbers. Since I am not a skilled programmer, it might take me a while to whip something like this up. This does not give you immediate access to the addressbook database, buyt would allow you to update the command line phone numbers based upon the current addressbook phone numbers.


\\\"I can do everything on my Mac I used to do on my PC, plus alot more ...\\\"

[ Reply to This | # ]
System address book via shell?
Authored by: Krioni on Jun 09, '03 02:34:51PM

Oops. I posted the shell script outside your question. Just in case you're waiting for a response to post, look below. You'll probably want to remove the -s "s" option for shells to parse the results. You may also want to add to the AppleScript to return a line-delimited list. I think I'll do that myself. :-)

[ Reply to This | # ]