Scriptlets – When All You Need is a Little Bit of Hosting Space

Every so often I throw together a quick hack whilst putting together another post. Take the Split Screen Screenshots bookmarklet as an example, that was built back when I needed to grab the top and bottom part of a long web page in a single screenshot.

At the time of the post, I couldn’t get access to my VPN server, so I couldn’t post a fully working bookmarklet with the PHP based hack I’d put together… which is where Scriptlets looks really handy. Scriptlets is a Google App Engine app that lets you write snippets of runnable code (currently Javascript, Python or PHP), access POST and GET variables, and make HTTP requests to other services. (Read more at Easy hook scripts with Scriptlets.)

So for example, creatinga script endpoint for the splitscreen bookmarklet is easy (the code is taked from the original post):

Calling the scriptlet with a URI for the page you want to split works a dream: Split the BBC homepage into two frames

And here’s what the bookmarklet needs changing to:


As a bit more glue to go withYahoo Pipes, it’s absolutely perfect :-)

PS err, maybe not perfect… in further testing, the scriptlet just returns some debugging noise. A couple of page refreshes and eventually it comes good, but this is far from ideal…

PPS here’s another tool for pasting and running code snippets (I think…?!): Codepad

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

One thought on “Scriptlets – When All You Need is a Little Bit of Hosting Space”

  1. Codepad looks interesting but note that for Perl there is no access to any CPAN modules as far as I can tell, which significantly reduces its utility.

Comments are closed.