Introduction

FOAF has classes and properties that can be used to relate a person to an online account that they have with a given service.

Many services provide their users with bookmarklets that allow them to interact with their functionality. And increasingly these services are RESTful, meaning the URLs typically include the users account name.

Many people write additional, improved bookmarklets that supplement or extend the basic functionality of these services, sometimes in conjunction with other services. It's often difficult to track all these extra facilities.

Wouldn't it be nice if one could use a browser extension that serves you with all the latest bookmarklets for your services, without your having to track them all down?

Implementation Notes

Craft an RDF document to describe the bookmarklets.

Write some code to process a FOAF description, containing OnlineAccount information, merging that with the above to generate usable Javascript.

Output these links as an RSS feed, so that they can be subscribed to using the Firefox Live Bookmark facility. Firefox doesn't allow this, presumably because of potential security breaches

Output these links as a bookmarks file so they can be easily imported into Firefox.

Describing the Bookmarklets

<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      xmlns:foaf="http://xmlns.com/foaf/0.1/"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:js="http://purl.org/net/schemas/js/">

  <rdf:Description rdf:about="http://del.icio.us">
     <dc:title>del.icio.us</dc:title>
     <js:hasBookmark rdf:nodeID="#del-popup"/>
     <js:hasBookmark rdf:nodeID="#expt"/>
  </rdf:Description>

  <js:Bookmarklet rdf:nodeID="#del-popup">
     <rdf:label>Popup Post to Del.icio.us<rdf:label>
     <js:code>javascript:......$accountName....</js:code>
  </js:Bookmarklet>

  <js:Bookmark rdf:nodeID="#expt">
     <rdf:label>extisp.icio.us</rdf:label>
     <js:url>http://kevan.org/extispicious.cgi?name=$accountName</js:url>
  </js:Bookmark>

</rdf:RDF>

Generating the bookmarks is just a matter of merging this file with the users FOAF description. The accountServiceHomepage property will link the user's OnlineAccount to the bookmarklet data. The code need only replace occurences of $accountName in the bookmark(let) data to generate the working Javascript code.

The value of the js:url and js:code properties will obviously need XML escaping.

As a nicety the service should sort the bookmark(let)s by the dc:title of the service name.

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.
« This page (revision-1) was last changed on 17-Jun-2005 04:58 by unknown [RSS]
G’day (anonymous guest) My Prefs


Referenced by
Main

JSPWiki v2.6.0 [RSS]