vCard Notes

Thursday, May 31st, 2007

vCard is a specification for representing contact information. It’s used to move information between address books in a non-proprietary format, and to download or even upload contact information from web sites.

Apple’s Macintosh Address Book supports vCard as an export and import format as does Microsoft Outlook.

A vCard can contain things like addresses, phone numbers, email addresses, even photographs.

I’m working on a web site which stores contact information for businesses and I want to be able to make that information available to my users in vCard format. So… I’m coding in Perl. There are two Perl packages that look helpful - Net::vCard and Text::vCard. It turns out that Text::vCard is a more recent version of the same codebase as Net::vCard.

Text::vCard provides methods for creating a vCard and setting the data it contains. You can then create an address book using Text::vCard::Addressbook and use its export function to get the actual vCard text.
(more…)

Sponsored Links