Warning: don't click on the epub file expecting to see anything useful. Your browser will gobble all your available memory to show you a binary zip file.
I was reading the Startup Bible in PDF that I had on my iPhone and decided that such great writing deserved better presentation.<p>There are some formatting gotcha's, I put this together rather quickly so it uses some libraries that aren't too gentle with pg's circa 2001 HTML formatting.<p>I hope this doesn't violate pg's sense of copyright of his works, if so, will take down immediately.
Seems to be missing one of my favorites: Maker's Schedule, Manager's Schedule.<p>I've been thinking about making a tool based on that idea: <a href="http://makerscheduler.com" rel="nofollow">http://makerscheduler.com</a> aka <a href="http://msched.com" rel="nofollow">http://msched.com</a>
icco Added a mobi version (Thanks!) and I put in an updated version that had a few bugs. There are definitely spacing issues etc but you can pretty easily understand the original meaning. Here's the main loop of code that extracts the text, if anyone has a better idea let me know:<p><pre><code> source = open(link['href']).read
text = Readability::Document.new(source, :tags => %w[div p br font]).content
xhtml_text = Sanitize.clean(text, :elements => ['a', 'div', 'pre', 'br', 'font', 'p', 'img', 'table', 'tr', 'td'], :attributes => {:all => ['class', 'id', 'src', 'href']})
xhtml_text = Mustache.render(xhtml_template, :title => link.text, :content => xhtml_text)
</code></pre>
where ePub formats expect something like<p><pre><code> xhtml_template = <<XHTML
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml>
<head>
<title>{{title}}</title>
</head>
<body>
<h2>{{title}}</h2>
{{{content}}}
</body>
</html>
XHTML</code></pre>