Really Simple Discovery

March 12th, 2007

As I mentioned in my last post, Really Simple Discovery is a mechanism by which blog editors (such as MarsEdit) can programmatically obtain information about the publishing APIs a particular blog supports.

Most of the “big blogs” support this feature, albeit to varying degrees of usefulness. Take a look at the source code to this page, if you’re reading it on the web. You’ll see near the top of the page a line like this:

<link rel=”EditURI” type=”application/rsd+xml” title=”RSD” href=”http://www.red-sweater.com/blog/xmlrpc.php?rsd” />

See the href= section? That’s pointing at a separate URL where my blog advertises information about how it can be programmatically edited. The idea is the user gives MarsEdit a simple home page URL, and MarsEdit can go work out the details of the interaction with the blog, by examining its RSD file.

As you can probably imagine, my new role as the principal developer of a popular weblog-publishing application, requires me to be pretty familiar with this format and with the contents of RSD files on various sites. It hasn’t taken me long to get sick of manually looking up the RSD for a particular page, and loading it in a separate window. I want to see the RSD, and I want to see it now!

Show RSD

Go ahead, click it. You should see an alert appear with the content’s of my blog’s RSD file displayed. Better yet, if you’re in the unusual position of needing to look at these things all the time, you can drag the above link to your bookmarklet bar, for convenient access whenever you’re staring at a blog you’d like to discover.

Personally I tend not to use bookmarklets, preferring to package up the JavaScript in an AppleScript so that I can easily attach it to a keyboard shortcut with FastScripts. From now on it’s Cmd-Opt-R for RSDs in Safari.

Credit: The Bookmarklet contains code from Apple’s excellent documentation on the subject of XMLHTTPRequest. My first time using the handy little beast!

5 Responses to “Really Simple Discovery”

  1. Eric Blair Says:

    Not to undercut FastScripts, but if you’ve got space on your bookmark bar in Safari, you can place your bookmarklets there – the first 9 items in your bookmark bar (excluding the Address Book and Bonjour items) are mapped to Cmd 1-9 (not sure if the 10th is mapped to Cmd-0).

    I use this so I have quick access to things like BugMeNot, Post to Cocoalicious, and the W3 Validator, to name a few.

  2. Adam Bell Says:

    The Show RSD link doesn’t work for me in Camino or Safari, Daniel.

  3. Daniel Jalkut Says:

    Adam: I see what you mean in Camino. Anybody know what I need to do to the bookmarklet to make it work in Camino?

    And I assume you meant FireFox or something instead of Safari? It works well for me in Safari.

  4. Adam Bell Says:

    If I run it from a script, I get the message:

    Safari can”™t run the script “function loadXMLDoc(url) {req = false; if(window.XMLHttpRequest && !(window.ActiveXObject)) { try {req = new XMLHttpRequest(); } catch(e) {req = false; } } else if(window.ActiveXObject) { try { req = new ActiveXObject(‘Msxml2.XMLHTTP’); } catch(e) { try { req = new ActiveXObject(‘Microsoft.XMLHTTP’); } catch(e) { req = false; }} }if(req) {req.onreadystatechange = processReqChange;req.open(‘GET’, url, true);req.send(”);}return req;}function processReqChange() { if (req.readyState == 4) { if (req.status == 200) {alert(req.responseText) } else { alert(‘There was a problem retrieving the XML data: ‘ + req.statusText); } }}function GetHrefForLinkWithType(theLinkType){var myLinkList = document.getElementsByTagName(‘link’);for (i=0; i

  5. Adam Bell Says:

    Reply box cut off end of message. It works in Safari if I change that to my default and click it from an open page to this site.

Comments are Closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.