Mon 23 Oct 2006
I was recently sent a link to this article. It basically describes an application that has been launched by the Bluetooth SIG that allows you to “embed a chunk of data … in a web page and have it copied to a mobile phone at the click of a mouse”. Although I must say I didn’t RTFA I did think to myself “What’s the point in this? Why not just link to a vCard, download it then send it to your phone?” I basically decided that all it did was convert a 2 step process (download file, send file by bluetooth) into a 1 step process.
After thinking about it a bit more (and, yes, still not reading the article, I’m very much of the slashdot generation) I realised that there was a bit of a similarity between this and microformats. I got to thinking about knocking up a program that would skim over a web page, pull out all the microformats on it, and allow you to send these using bluetooth. After a mention from Andy Hume and a visit to the WSG Meetup on Microformats I decided to have a go at hacking this support into tails export (edit: a great Firefox extension that already exists for pulling microformats out of a page and exporting them to your computer).
One slight problem I had to start with was that the export feature of tails export doesn’t actually work with OS X. Tails export appears to work by creating a file containing your event or address information, then setting the URL of the browser to point at that file. Quite ingenious really, it saves having to worry about what program to load the file in as the browser should take over and load the file in whatever program you have setup to handle it on your system. Unfortunately that doesn’t appear to work on OS X. On a mac, on the command line, we have the nice ‘open’ command which does exactly what we want, opens a file in the associated program. So all I needed to do was figure out how to make tails export use that when run on a mac. After spending a frustrating few hours on a train on Friday night trying to research this using the Opera mini browser on my phone, I finally found the solution on Saturday morning. “nsIProcess” is an XPCOM component that you can use to fire off programs from within a Mozilla based browser. I found a handy example online and then managed to add the support to tails export without too many problens (ok, maybe there was an hour of trying to figure out why it wouldn’t open in the Bluetooth File Exchange app which turned out to be because I was passing a file:// URL).
So, that’s about it, I’ve packaged up a new version of tails export, you can download/install it as tailsexport-0.3.1-jmck.xpi (update: see bottom of article). I make no guarantees for the reliability of this extension, if it blows up your computer and deletes all your blog postings, I’m taking no responsibility. This is the first time I’ve touched a Mozilla/Firefox extension so I have no idea if I’ve done things the right way. That said, it works nicely for me, my Sony Ericcson k750i works well with the vCards though unfortunately doesn’t seem to accept the iCal stuff. I’ll let Robert de Bruin know and see if he’d like to add my changes to the official build.
As a last note I thought I’d mention that I did eventually read the article that I’ve linked to right at the top of this page. I thought I should before writing this blog posting just in case it turned out that the application was doing something amazingly clever that I’d just missed. What they appear to be doing is having developers include a JS file on their page, then when users click the “TransSend” button some JS has to be run to either pick the bits of information out of the page and construct a vCard on the fly, or use a pre-built hardcoded vCard (I haven’t yet found docs on how to embed TransSend stuff yourself though, just looked at the examples). This seems like a really nasty solution to me though and I really wish they had heard about Microformats at the Bluetooth SIG. Microformats look like the perfect solution for them, just a shame they are a bit behind the times!
Update! 26th October 2006 – As I mentioned above the extension didn’t work for exporting calendar events to my phone. As it turns out it didn’t work for sending vCards to Nokia phones either (thanks Stuart for testing that). I’ve put small updates in to fix these problems which you can find in tails-export-0.3.1-jmck2.xpi. The calendar events problems were caused by a file extension problem, my phone only accepts .vcs not .ics so I’ve simply changed the file extension for now. Also the Nokia problem was due to bad line endings, I’ve fixed this using a JS replace but hopefully I’ll fix this in a better way when I update to Brian Suda’s latest XSL.
Update 2! 26th October 2006 – It seems Nokia phones are still having problems which appear to be due to a lack of support for URIs for the PHOTO value (and possibly other values). Also note that there are character set issues too, but these should be fixed when I update to the newer XSL.
Technorati tags: microformats, bluetooth, firefox
October 23rd, 2006 at 11:06 am
Hey dude, this rocks – nice work.
October 26th, 2006 at 10:55 am
Lovely jubbely – nicely done!
November 9th, 2006 at 2:30 pm
Hay John,
Nice! I’ll see how and when I can get this in the ‘official’ build.
Cheers Robert.
May 19th, 2007 at 7:01 am
[...] Get the Tails injected with bluetooth export here: http://blog.johnmckerrell.com/2006/10/23/microformats-tails-export-bluetooth/ Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages. [...]
May 19th, 2007 at 10:24 am
[...] Jeremy Keith har lavet en video-demo af, hvordan man kan eksportere en begivenhed (hCalendar) microformats fra web til mobiltelefon med John McKerrells Tails Export Bluetooth (Firefox plug-in) [...]
May 19th, 2007 at 1:00 pm
[...] Telle est la raison pour laquelle Jeremy n’a pu réaliser la démonstration toujours très parlante de l’exportation de cartes de visites balisées hCards vers un téléphone mobile bluetooth. Le dernier jour de XTech 2007, j’ai kidnappé Ian et l’ai forcé à shooter une vidéo rapide d’une démo microformats que je n’avais pas eu la chance de pouvoir inclure dans ma présentation. La vidéo dure une minute et une seconde. C’est une démo rapide de la version bluetooth du plugin Tails de John McKerell. Regardez la vidéo sur YouTube. Regardez-la sur Viddler Voici une transcription traduite : [...]
November 6th, 2007 at 11:35 am
[...] Original source : http://blog.johnmckerrell.com/2006/10/23/microform…; [...]
September 4th, 2008 at 11:03 am
not compatible with firefox 3..
September 7th, 2008 at 9:16 pm
Hi Eric, your best bet is probably to use Operator which I believe has a plugin for doing this. If you really want to use Tails Export you might want to try unzipping the plugin and editing the version numbers that it’s compatible with yourself, may not work but it’s about all I can suggest.
John
October 14th, 2008 at 2:16 am
But operator doesn’t support export to bluetooth device. Is there any FF3 supported microformats plugin that supports export to a bluetooth phone like this Tails Export did? Demoing a bluetooth export to a mobile phone is an incredibly powerful tool for microformats advocacy. It’s unfortunate that this being the only plugin that does it is not updated for FF3.
October 15th, 2008 at 9:18 am
@Emir – I think you have to install a user script for Operator, take a look at these links:
http://www.kaply.com/weblog/operator-user-scripts/
http://microformats.org/wiki/operator-phone-tests