TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Entrepreneur Manual: Paul Graham's Essays in ePub Format

57 pointsby dyabout 14 years ago

6 comments

seijiabout 14 years ago
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.
评论 #2443533 未加载
评论 #2443628 未加载
评论 #2443525 未加载
评论 #2443661 未加载
评论 #2443734 未加载
dyabout 14 years ago
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.
taylorbuleyabout 14 years ago
Was hoping to see "republished with permission" somewhere before downloading. Does PG give open license to reproduce/distribute?
评论 #2443831 未加载
dreevesabout 14 years ago
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>
dyabout 14 years ago
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 =&#62; %w[div p br font]).content xhtml_text = Sanitize.clean(text, :elements =&#62; ['a', 'div', 'pre', 'br', 'font', 'p', 'img', 'table', 'tr', 'td'], :attributes =&#62; {:all =&#62; ['class', 'id', 'src', 'href']}) xhtml_text = Mustache.render(xhtml_template, :title =&#62; link.text, :content =&#62; xhtml_text) </code></pre> where ePub formats expect something like<p><pre><code> xhtml_template = &#60;&#60;XHTML &#60;?xml version='1.0' encoding='utf-8'?&#62; &#60;html xmlns="http://www.w3.org/1999/xhtml&#62; &#60;head&#62; &#60;title&#62;{{title}}&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;h2&#62;{{title}}&#60;/h2&#62; {{{content}}} &#60;/body&#62; &#60;/html&#62; XHTML</code></pre>
评论 #2443807 未加载
wazooxabout 14 years ago
Something isn't right. It doesn't work in Epub reader (FF extension), it doesn't open in Calibre, and it doesn't open on my PRS-505.