I've been wanting to read SICP for awhile, but with lots of other books on my to-read list, as well as the $50 dollar price tag for a used copy, I've put it on hold. The price, while relatively steep, usually doesn't stop me from picking up a highly-desired book, but I held off mainly as the book is freely available on their website, under the Creative Commons Attribution-Noncommercial license and this seems like a lot to pay for a free-as-in-beer book.
Since SICP runs close to 600 printed pages and approximately 40 HTML files , I'd rather not read it in my browser and printing it on the home printer is not really an option. I decided that using Lulu might be a workable solution.
Lulu takes PDFs so step one was to convert the SICP website to one big PDF.
First, I used wget to mirror the site. Now that I had all the files, I wanted to clean them up a little. Every single page had the previous and next links at the bottom and this was obviously not needed when the pages are in physical form. I ran the following sed command to remove these lines:
sed -i "/[Go to/d" *html
The next step was to convert the HTML to PDF. I used htmldoc for this particular task. First, I put all the names of the HTML files in one text file, on one line, and in the correct order. I called this file “all_files.txt”. The htmldoc command I used to convert to PDF is the following:
htmldoc -f sicp.pdf --webpage --left .75in --right .75in
I then uploaded this file up to Lulu and designed my (very) simple cover. I made it clear on the back cover text that I was printing this book under the rights granted by the aforementioned license and would receive no profit from this book with a link back to the original source. I'm not a lawyer so I hope that covers all bases.
Lulu has a convenient feature that will let you do a private printing. I could probably make this book public, setting my profit to zero, and even though that would be covered under the license, it still feels strange to do.
I am very curious how this book will turn out. The Lulu process was actually fun and if this turns out well, I could see myself using the service again. Once I get the book, I'll post my reviews of the service and possibly some pictures of the final product. Nonetheless, I'm excited to get a print version of this book for a much-reduced price.
Edited to add:
Here's the download for the PDF: sicp.pdf