Unfortunately, not many web sites use them (the most important sites that use them are owned by Yahoo: Flickr, Upcoming, Yahoo Local) and browsers need special plug-ins to understand them. But things are about to change since Firefox 3 will handle microformats natively and Google Maps started to support microformats for local search results. "Why should you care about some invisible changes to our HTML? By marking up our results with the hCard microformat, your browser can easily recognize the address and contact information in the page, and help you transfer it to an addressbook or phone more easily." Google Maps API supports this microformat as well, but developers have to change a few lines of code.
To export the results from Google Maps, you should install the Operator Firefox extension. For other browsers minus Internet Explorer, try this hCard bookmarklet. (If you know a cross-browser bookmarklet or an hCard parser that works in IE, post the URL in the comments.) These tools convert hCard to vCard, a file format that can be imported into many applications, like Outlook or the built-in Address Book from Windows and Mac. In fact, hCard is just an HTML representation of the vCard format that can be obtained by simply adding some standard class names.
<div class="vcard">
<span class="adr">
<span class="fn n">Googleplex<br />
<span class="street-address">1300 Amphitheatre Parkway</span><br />
<span class="locality">Mountain View</span>,
<abbr class="region" title="California">CA</abbr>
<span class="postal-code">94043</span>
</span>
</div>
Google could add support for microformats in its popular toolbar, which already tries to detect addresses and link them to Google Maps. Besides, if more people use microformats, Google has to do less guesswork to extract useful information and to make it searchable.
Jeremy Keith writes: "This is a huge leap in the number of published hCards on the Web. It would be interesting to get exact numbers but I'd guess that the amount of places returned in Google Maps searches runs into the millions. The beautiful thing about all this is that I suspect the change was trivially easy: just adding a few extra class names into a template."
So what about my GMail Contacts?
ReplyDeleteFor Gmail, use this vCard to CSV converter. Choose the Gmail (CSV) format and disable "vCards with e-mail only". Then import the CSV file to Gmail.
ReplyDeleteIt's funny that this microformat concept wanted to simplify things and, because of the lack of support, you need to do a lot of work to perform simple actions.
Google Maps could have this option: "save as a Gmail contact", Gmail could understand vCards, your browser could support hCard.
I just added supports for hCard in Open Contacts program (http://www.fonlow.com/opencontacts). Actually I did not make any code change to the program, but simply wrote an XSLT file to transform Open Contacts' XML into HTML with hCard tags. Open Contacts is probably the first desktop program providing friendly supports to hCard. You may customize the XSLT file to export contact info you want to publish according your privacy policy. Please read more at
ReplyDeletehCard and Address Book Programs
I recently upgraded the Microformats Bookmarklet to support IE6 and IE7 - so now we've got a cross browser Microformats parser.
ReplyDelete