I updated the code of the previous experiment (Sharing Ubiquity Commands) such that when you open an URL that contains a shared Ubiquity action, it won't open Ubiquity in preview mode, but display a small icon.
This also allows to display multiple commands on one page, and by using Ubiquity annotation database I could create this command history; such that when you revisit a page where you had already applied some ubiquity commands you will see the icons for each, awaiting re-applying.
Note: The icon and icon insertion code is repurposed from Aza's Mouse Based Ubiquity experiments.
I recently spoke with Aza Raskin at FOWA on Ubiquity commands/annotations sharing. I promised I'll prototype something, here it is…
When someone applies an Ubiquity command to a piece of content that tells us what's the type of that content. The user is making an annotation which is not made for the annotation sake, but made for solving a real need. That annotation if shared could be useful in various ways.
But first let's look at all the data involved, consider that Alice is selecting some text on a web page, invokes Ubiquity and types 'translate to japanese'. We have the folowing elements:
We need to find a way to identify the last 3 components with a single URI. Why? to tap into what URI power: you could bookmark, synchronise bookmarks online, view the applied command in your browser history and just share that "link" via twitter, facebook, etc.
We can already point to a specific location into a web page, provided that that location is emcompassed into an elment that has an id, like:
http://events.carsonified.com/fowa/2009/london/speakers#azaraskin
If that element had no id, we could use XPath to point to it, the full path in the DOM would be:
/html/body/div[3]/div/ul/li[3]/div/a
Or we could just simply assign identifiers like the purple numbers:
http://www.purpleslurple.net/ps.php?theurl=http…events.carsonified.com…speakers#purp199
However we have an specification to address such content—which even does better—it allows addressing of ranges, imagine that your selection crosses element boundaries (and users do such selections), like selecting "What you'll learn * The advantages to using Objective-J, Atlas and Cappuccino" from the Atlas workshop description. That selection starts with all the content of a heading and ends up in a paragraph. The specification that can address this is XPointer, the URI that points to this selection in that particular web page looks like this:
It is quite verbose, if you want to pass it around you could shorten it to http://bit.ly/lkDFs for example.
Now to pack the Ubiquity command line into, we could use a convention, like:
http://…#ubiquity:command-line;xpointer(…
for example (here the URL is properly escaped):
http://example.com/#ubiquity:translate%20to%20japanese;xpointer%28string-range%28/html[1]/body[1]/p[2],%20%22%22,%201,%2096%29%29 (again shorter would look like http://bit.ly/4uf0bX)
Having this convention, all it is needed is to listen to Ubiquity commands and update the location bar with the Ubiquity URI, and when the user loads a page with such an URI it should reproduce the selection and invoke Ubiquity.
By the magic of Ubiquity and XPointer extension for Firefox, I prototyped it in couple hours. Playing with it I observed the following issues:
For the first issues there are solutions, like storing somewhere (like in tinydb.org) a stack of 'Ubiquity URIs' to be applied in a specific order, and pass the stack identifier around.
I added the command line as a prefix to the title, and solved the second issue; now in browser's history or in a bookmark the above example reads "translate to japanese: Example Web Page".
The third issue require an intermediate page that would be shown if the user has no Firefox, Ubiquity or that specific command; but this solution creates other issues:
Enough talking, go play with the prototype (you will see the intermediate page mentione above):
http://namebound.com/ubiquity/share
Note: You need to install xpointerlib extension and Ubiquity must be at least 0.5.5pre7.
TODO:
Laurian, purl.org/net/laur
Well, as opposed to these typographical differences, I believe that this illustration gives you the feel of Arial versus Helvetica.
In a near dark future we may have to go this way. Have our public tweets bot proof, and the Twitter API returning base64 encoded images of our tweets instead of text, unless you're a really good friend … then you may have some of your friends sell your plain text tweets to advertisers, friends hacking friends' accounts to harvest more sellable tweets, etc.
Well, that's a dark vision of the future, fueled by the readings I'm doing for a Cyberpunk course at the Peer 2 Peer University.I prefer to have as applications the webapps I use constantly, here is the icon I cropped from the hi-res web trend map to load the Web Trend Map app within Fluid.
It does not resemble the site (which is on white background with no ‘tubes’), but it has the same spirit.
I'll assume that who reads this knows what Ubiquity is, if not check it out, it's awesome.
Since Ubiquity can remember edits you do to a page (via edit and save commands), it may also be able to remember what other commands you applied to a piece of content, such that when you revisit that page you'll see a small visual hint (could be similar to Alex Faaborg microformats experiments, or Aza Raskin's mouse Ubiquity experiments) that would let you re-apply the command.
Imagine that you visit a blog post about a party, and the map command is just one click away just because you did it before.
Now, imagine that you go to that blog post about a party sent by a friend, and you will see the map command your friend applied it there.
Moreover, all these commands applied to snippets of content tell what about the content is; in other words it disambiguate that snippet for a machine, and this kind of mappings could be very useful in the information retrieval and Semantic Web areas; they are annotations made not for the sake of annotations, but made because they solved a problem for a human.
Ubiquity could probably do annotation persistence quite easy, while sharing them could be done via Mozilla Weave.
That would be great, how about some interoperability right there on that very page, in that very moment? What if Ubiquity would add (upon applying a command) RDFa to the selected snippet with an rdf:type telling what the subject of the command is, or a microformat … and have additional extensions (like Operator) pick that up on that instant and do amazing things?