OS X Address Book into Subversion

Posted by Scott Laird Tue, 09 Mar 2004 10:59:17 GMT

Continuing the theme of backing up my PIM data via Subversion, I’m now exporting the contents of the OS X address book into a subversion tree, and then syncing that from my laptop onto a box at home.

This was a bigger pain then I anticipated; I couldn’t find a tutorial that showed how to use AppleScript to export data from the Address Book, but I could find an Objective C program that extracts data from it. I’ve never used AppleScript or Objective C, so either choice involves learning a new language. At least with Objective C, I have working source to start from. It took most of an hour to rip out the text printing code from ‘contacts’ and substitute in code to save vCards to individual files, but the result seems to work quite nicely. I’ll clean it up and release it eventually; if anyone is interested, send me mail and I’ll speed it up.

Update: I’ve released this as ab2vcard. Let me know if you have any problems.

Posted in ,  | Tags , , ,  | 2 comments

Comments

  1. billo said 1 day later:

    Yeah, I’m interested. I can’t believe what a pain it is to get records out of Address book! I’m setting up a blackberry I got from work, and I have to do this weird address book->export->outlook (on a PC) ->blackberry.

  2. Tony said about 1 year later:

    I tried that for the same reason but Outlook choked on the vCards exported by AB.

Comments are disabled