Over the weekend at the Lone Star Ruby Conf, I got to wondering if one could use the iPhone as an eBook reader. Since it has Safari built in, it seemed like a great device for dumping the HTML versions of books from Project Gutenberg or Cory Doctorow’s site into for easy reading on the road. Unfortunately, it doesn’t seem that there’s any way to access the local filesystem, directly or through Safari. Curses!
A little judicious googling, however, turned up another option: one can actually embed the data of a webpage directly into a URL by using the data protocol instead of the usual http. By using the URL to actually carry the content, instead of as a pointer to where the content actually lives, one no longer needs a connection to a web server or a file system. Cool! My dream lives!
But how to generate these cryptic data URLs? You can fool around with Perl or your favorite scripting language and generate them without too much fuss. However, the guys at Insanely Great Tees have knocked together a little utility that does the hard work for you: just drag and drop a file on it, and it will generate a URL with the data from that file embedded in it. You can then bookmark it, sync it to an iPhone (or presumably, an iPod Touch in a few weeks), and have offline content.
Now, I just need an iPhone to try it on…