This feed contains psw Ubiquity command, accessible as "find". Subscribe to the feed and confirm the further screen.
You need to have Firefox installed and Ubiquity 0.1.8 to be able to use it.
You can also access the source here: psw.js, in case the server does not serve the js right or you cannod install it with the standard feed adding mechanism.
It allows a user to search for a specific property of an object identified by a string in the page, and then insert the result back in the page, formatted using a microformat suitable for the type of property retrieved.
This can prove particularly nice when one is editing a document in a rich text area in the browser, and wants do add the particular piece of information in the text area: the inserted content will be html, semantically marked to represent the looked up property. However, if the text area is a regular text area accepting only plain text, the raw result of the search will be inserted.
After installing it, you can access it in the ubiquity command
line with "find". The full format of the command is:
find <property> of <subject> in <source> as
<format>
a loading message will appear and the results will be printed in the
preview window on load. Once the results are loaded, the selected result
is printed with a background grey, and that is the one to be inserted in
the page at the position of the cursor on enter. To select another
result, you can click on it to select it, but don't forget to activate
back the command line before hitting enter to insert in the page.
For example, type now:
find occupation of Michael Arrington
or
find birthdate of Michael Arrington
Hitting enter while in a text area / rich text area will insert the text
at the position of the cursor, for the second inserting a hCalendar
microformat when in a rich text area.
Here is a screencast of the command in action, created for the Scripting Challenge entry at the SFSW2009 workshop:
The table below describes the parameters for the command, their meaning and usage:
| source | dbpedia http://dbpedia.org default if none specified |
dblp http://www4.wiwiss.fu-berlin.de/dblp/ | linkedmdb http://www.linkedmdb.org/ (very slow) |
| property | occupation, page (as link), birthdate (as date), bands, past
bands, members (as person), type default prefix: http://dbpedia.org/ontology/ |
author (as person), works default prefix: http://www4.wiwiss.fu-berlin.de/dblp/terms.rdf# |
page (as link), type default prefix: http://data.linkedmdb.org/resource/movie/ |
| when a property not in the list is specified, a search is using the default prefix of the source. For example, try searching dbpedia for starring, producer, releaseDate, director, writer when searching for movies. | |||
| subject | any user string, matched as resource pretty name (label) | any user string, matched both as work title and author name | any user string, matched as resource pretty name (label) |
| format | person (hCard), date (hCal), link (xFolk), vote-for, vote-against (vote-links) | ||
The command uses the SPARQL endpoints for a few predefined sources and a list of mappings for some natural language expressed properties, with a set of conventions wrt to where the subject should be identified on the server. When the command is inserted a SPARQL query is sent and the results are received as json, parsed in the command's Javascript and printed. When the command is executed (enter is hit), the currently selected result is formatted according to a predefined mapping between properties and microformats, or the user's choice if the as <format> parameter is used, and inserted in the page.
There is still work left to do to allow users to add their own data sources, to perfect the retrieving mechanism, and to also have automated detection of the format to be used for a property (based on the property semantic aligned with microformats semantics) and to retrieve full data to populate the inserted microformat. Also, there are a few touches to be done for the user interface and interaction.