Blogging was where we began, and how we built our company so we have preserved this archive to show how our thinking developed over a decade of developing the use of social technology inside organisations

Making Books and 8 hour Apps

by Felix Cohen
Over the last couple of weeks myself and my colleague Rich have been working on a little side project to scratch an itch for both of us. Back in February I declared bankruptcy on a couple of dozen long format pieces from my Instapaper and quickly threw together a book of the content using Lulu. 

4556864659_1a60da39da.jpg

The process used the Readability bookmarklet, then saving each page as a PDF and joining them together with Preview.app; fairly quick and painless, but the styling didn’t really work and it was missing a bunch of ‘book’ features, like a table of contents and page numbering. But it was good enough to read and make me want another.
I’d used PrinceXML before, so I knew it could do this stuff for us, but the lazy, impatient developer in me also wanted to be able to make my next book in 5 minutes, not 30, so after a bit of digging to find a good way of extracting the content from an article, I threw together a Sinatra web app for grabbing either a Instapaper or Delicious feed and concatenating the main content (hat tip to Tom Taylors extractomatic API) of the articles into some ‘good enough’ HTML. Thanks to another colleague, Riccardo, for opening up Wordler (a Sinatra app for creating word clouds), so I could get my head around the framework so easily.

Rich looked into the Boom! set of styles and formats for integration with Prince and, quite quickly, we had a tool for creating a book of the long format stuff from the internet that had seemed imposing on a screen. There are lots of instructions (using mostly existing CSS3 declarations) that can style the layout for print including new chapters, page titles, TOCs, Indexes; pretty much everything you need to replicate traditional typesetting. 

4564920897_b1dca6272f.jpg

A couple of iterations later and we decided to pop it up onto Github as part of a new initiative to show people what fun things we make in our ‘20% time’ at Headshift, and it’s already received a lot of attention.
Here’s how to get it running (instructions should work on a Mac)
First of all we need to install some dependencies. We use Ruby for the program, which will run on most modern macs.
sudo gem install sinatra haml feed-normaliser prince-ruby json open-uri digest/md5 redelicious
(this will take a while to run, so grab a cuppa now)
Download the latest zip file from: http://github.com/headshift/Bookler/zipball/master
and extract somewhere useful on your computer. 
Go back to the Terminal.app window, and ‘cd’ to the directory that was created when you unzipped the above. Once you’re in there, type:
ruby booker.rb
and you should get a notice saying:
Headshifts-MacBook-Pro:Bookler felix$ ruby booker.rb 
== Sinatra/0.9.6 has taken the stage on 4567 for development with backup from Mongrel
Open up your web browser and head to http://localhost:4567 to start making your book.
(at the moment you’ll also need to download and install Prince. There’s instructions for that on http://github.com/headshift/Bookler)
Now, this is genuinely a 8 hour project; it performs the one task that we wanted very well, and isn’t exquisitely coded or designed. But we can do this thing (making books) that even a year ago seemed non-trivial. Leaving aside the horrid, horrid copyright implications of doing this and taking other peoples content (though for me it seems to be equivalent to printing each web page and stapling them together!), this is a useful tool that we wanted to share.
But it’s not game changing in any real way, no matter how exciting it seems to us. I think that because we had to invest
so little time in the project (it was really just a matter of gluing together some code from other people), it just doesn’t feel that significant.
What is significant, though, is that ease. Neither of us are part of the Ruby on Rails team here at Headshift, but were able to pick up enough Ruby to build it in Sinatra (a very simple, very great framework for this kind of app), and find enough tools to make it fast, easy and ‘good enough’. The generalist skills and assumption that this would not be a hard problem, however, do seem important.

4564921441_53f9ca31bd.jpg

While the publishing industry worries about eBooks, DRM and how to handle the hardback/paperback/eBook problem, people like us, Newspaper Club, Lulu, Mute, BlogBooker and Prince are churning out tools for what used to be the hard part of creating books; curating content, printing pages, binding books, formatting professionally and buying single copies are now trivial. The publishing industry, like the record industry, is based on the idea that these things are hard, and the author/editor is ‘only’ feeding into a infrastructure for making, promoting, distributing (and pulping) books or CD’s. But that’s simply no longer the case. This isn’t a paean to some exciting post-digital event, it’s just that it’s now trivial to play with putting words onto paper in a professional way.
Publishers need to understand that for a new generation, combining, creating and formatting content is a normal activity, and we are able to build small tools for specific uses easily and quickly. This attitude of exploring what curation and creation means to ‘Millenials’ will be very important to the publishing industry as it enters the economic doldrums and needs to become more agile and innovative. Publishing houses need to find people who can create these tools, not for new business models, but to scratch itches that didn’t exist 10 years ago, and provide them with the freedom and time to make fun things like Bookler. Or we’re going to end up going down the same routes as the record industries have already shown to be customer-hating and profit-minimising.

Comments are closed.