Toad curl

[UPDATE: Feh. This only works for certain kinds of docs, like Cocoa APIs. I may try to make it work more generally when I get a chance, but it probably works for most of the cases I care about, so I may not bother.]

I wrote a quick and dirty bookmarklet that navigates from a local documentation file to the online ADC version of that file. To get the bookmarklet, drag the following link to your browser's bookmark bar: toadcurl.

To test, use your browser to open the local doc file for, say, NSString. You can easily do this from AppKiDo or the Xcode doc window. Once you have the page displayed, click the "toadcurl" bookmarklet and you should go here.

I sometimes want to do this for two reasons:

  1. I might wonder if the online version is newer; and
  2. I might want to paste the online URL into an email, rather than a file:// URL that might not work for the people I'm emailing to, depending on what version of Xcode they're running and where they have the Dev Tools installed.

I originally named it "toADCurl", since it generates a URL that links to an ADC page, but changed it to all lowercase because I liked the random phrase "toad curl". Of course you can name it whatever you want.

I've only tested with Xcode 3. If it doesn't work for earlier versions, perhaps someone could send me a fix?

It's entirely possible there's already a way to do this that I missed. If so, I'd love to know about it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.