Entrepreneur Manual: Paul Graham's Essays in ePub Format
github.com
github.com
I shouldn't have.
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.
I hope this doesn't violate pg's sense of copyright of his works, if so, will take down immediately.
That being said, I do wonder where the line is and will be drawn in the coming years. The ePub artifact itself may be controversial (not really sure) but I'm pretty sure I could distribute the code that generates the ePub or create a page that says "click this button to generate the ePub download" and have legal precedent on my side (from the VCR cases and since there isn't any DMCA workaround I'd have to get through for the content).
I recently saw on startuplessonslearned that they're selling their blog content for 29.99 (more than worth it IMO) but at the same time, their target audience could easily circumvent the need to do it either through instapaper, writing their own script or any other myriad of ways.
And of course someone could get around the need to pay $29.99 by writing a script, but if you value your time at all it wouldn't be worth it.
We think it's a good deal for Eric (he makes money from something he has given away for free) and a good deal for the reader (it's much more pleasant to read a PDF than to click through posts in a web browser, and even more pleasant to read it on a Kindle.).
My main point was that e-publishing seems like a tough business since the trend of information pricing seems to be heading to 0.
I've been thinking about making a tool based on that idea: http://makerscheduler.com aka http://msched.com
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)
where ePub formats expect something like 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>
XHTMLThis will produce a valid xhtml file that passes epub validation (http://code.google.com/p/epubcheck/).