The Lumber Room

"Consign them to dust and damp by way of preserving them"

Archive for August 9th, 2008

Have you been high today?

with 5 comments

If not, you need to see this (besides needing a bun to bite Benny Lava): [Make sure you read the subtitles before, not after the corresponding sounds.]

Read the rest of this entry »

Written by S

Sat, 2008-08-09 at 16:29:57 +05:30

Posted in Uncategorized

Tagged with , ,

Where Have I Seen…

with 9 comments

I have, for a long time, dreamed of a Firefox extension that would do this. Now, finally, empowered by Greasemonkey, I wrote one myself. (Technically, a Greasemonkey user script is not a Firefox extension, but it can be easily converted into one, and a Greasemonkey script is the Right Thing anyway.)

What it does: on any IMDB cast listing, show for each actor what other movies you have seen him/her in. Here’s a screenshot:

Clearly there is a lot of work left to do, but it took less than half a day to learn Greasemonkey (and parts of JavaScript) and write it, and it’s already usable! By me, that is.
[The following was true at the time of writing but is no longer true.] I don’t know if anyone else would be interested in this, but it currently won’t work anyway except when running on my laptop. This is its crazy “design”: on any IMDB page with a cast listing, it first looks for each actor on the page, and extracts their ID. (Reasonable so far.) To find their other movies, it then makes a xmlhttp request to a PHP script running on my laptop, which then calls a Python script and returns its raw output inside ‘pre’ tags. Now you know. The reason for this nonsense is that there was no JavaScript API/library for IMDB while there was one for Python, so it was really easier to just use the latter, and the only way available of interacting with the “outside world” from a Greasemonkey script is through xmlhttp requests, and…
Anyway it’s not all that hard to parse each actor’s “other movies” through JavaScript myself, if that’s all I’m doing, so I might get to that eventually. (I also considered keeping IMDB’s data locally and parsing the text files, but they’re huge and not very well-formatted: No IDs, for example.)

It’s currently named “WHIS”, can you think of a better name? :)

Update: It’s now a full-fledged Greasemonkey script, and is up on userscripts.org.

Written by S

Sat, 2008-08-09 at 06:41:02 +05:30

Posted in Uncategorized

Tagged with , ,

Follow

Get every new post delivered to your Inbox.

Join 57 other followers