Greasemonkey is an extension for Firefox that allows users (i.e., you and me) to run javascript programs of our choice, called user scripts, to change the look or behavior of web pages.
WorldCat is a service that lets you search the catalogs of libraries both nearby and around the world.
Amazon is, well, Amazon.
Atalib is a Greasemonkey script that runs on Amazon pages. It performs a search on WorldCat, and displays the result on the Amazon page, so you can see if the item is available from a library, near or far. WorldCat helpfully orders its results by distance, so you can easily determine whether the item you're interested in is available within biking distance, or if you will need to charter a jet.
To use Atalib:
Get Firefox if you're not using it already.
Install Greasemonkey. You'll have to restart Firefox after installing it.
Look for one of these two ways of installing the script.
Whichever you see, click the Install
button to install
Atalib.
It was fun to find out that a manual of Japanese etiquette is available through the Library of Congress, and that the library of the Nelson-Atkins Museum owns a copy of Introduction to the X Window System.
Atalib is a greasemonkey script that adds Worldcat search results to amazon pages.
This weekend, I discovered a few bugs that needed fixing.
Texas A&M Library, it would be shown as
M Library.
undefined. (I had no idea distances might not be provided for libraries!)
Both these bugs have been fixed in the newest version of the user script, which is available for download.
Details about the usage of atalib, and how to install it can be found on the original announcement.
As I mentioned, I recently had to change Atalib to track changes to the search result page at WorldCat. The updated version is now available: atalib.user.js
As mentioned before, I want to improve the way I was serving source files. An obvious improvement is to link together version control with distribution, and the obvious alternative was cvs and CVSweb. Because of recent changes, atalib, the greasemonkey script for adding WorldCat search results to Amazon pages, was an ideal candidate to try on the new arrangement.
Unfortunately, CVSweb is not well-suited to serving userscripts, and/or greasemonkey does not play well with CVSWeb. See, CVSweb serves up pages for URLs that end with the filename of the version controlled file, but the resource addressed by the URL is not actually the file, but a presentation of metadata for the file, version histories, branches, that sort of thing.
As a more concrete example http://cvs.ninthorder.com/cvs/atalib.user.js does not address the atalib userscript, itself, but the revision history as seen below.
Here's where it starts to get rocky: greasemonkey believes that when
a URL that ends with user.js
is loaded, greasemonkey should
intercept it and try to install it as a greasemonkey script. While
greasemonkey is enabled, you can't even load the page that has the link
to the actual greasemonkey script.
Which brings me to the next issue: The link to the actual script
does not end in user.js
, it ends in a revision number,
so it will never be intercepted by greasemonkey to be installed.
I'm working on rules for mod_rewrite
that will allow a URL of the form .../atalib.user.js
to address a
revision via CVSweb. That part really isn't that hard. Unfortunately, if
you want to browse the CVS repository for a greasemonkey script, you're
going to have to disable greasemonkey while you do it.
UPDATE: Jeff suggests that no one really wants to browse the revision history of my files. That might be true, in which case all I need is to expose a cvs checkout to the web. It's a thought I had last night, too, and it's worth further consideration.
UPDATE: Further, Jeff wondered why I was using 20th century
technology for revision control. The answer was, I'm reasonably familiar
with cvs and CVSweb. He says I should be using git because he and Linus both like it. I
decided to scrap cvs for now and try bazaar for version control, because it
provides many of the same features as git, and the Canonical people at
PyCon 2007 gave me a
bazaar t-shirt. (Commit. Push. Merge.
)
The format of WorldCat search results pages has changed, and it broke Atalib. I've fixed the bug, but haven't worked out how to provide the updated source in my new, improved blogotube information architecture.
The corrected version should be available soon.