|
|
|
Export Address Book entries to HTML via AppleScript
If you want to export your AB data for viewing on the web (not necessarily for print though it could certainly be used for that), the script below is what I would use. This script differs from the original as it better handles multi-line values, allows you to specify URI schemes for the various data types, adds a hyperlinked index, embeds the css directly in the file, somewhat improves the HTML output, and has a host of other script optimizations. While optimized, it is still painfully slow (the script takes roughly 5 minutes for about 200 contacts on my Mac OS X 10.5.2 MBP).
Jon Nathan
Export Address Book entries to HTML via AppleScript
I noted that the script stops with an error with badly formatted addresses, so I made this change to your script in the address retrieval part:
and added the following method at the end of the script:
Export Address Book entries to HTML via AppleScript
It's probably a good idea to wrap more sections in try blocks in case there is a problem with the data. In case of an error with the formatted postal address, I'd construct it manually (this follows the US's convention for formatting postal addresses, update to your country's format as desired):
Jon
|
SearchFrom our Sponsor...What's New:HintsNo new hintsComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,455 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.03 seconds |
|