Print ready version of The Sequences
post by Jordan · 2010-11-06T01:21:20.328Z · LW · GW · Legacy · 33 commentsContents
33 comments
I've been wanting a printable copy of the sequences to read through in meatspace. I wrote a quick scraper and uploaded the results here http://pwnee.com/Sequences/list.html
Inter-linking doesn't work, but I just wanted a printable version anyway.
33 comments
Comments sorted by top scores.
comment by Paul Crowley (ciphergoth) · 2010-11-20T16:45:54.833Z · LW(p) · GW(p)
I've now written a fairly sophisticated scraper for Eliezer's blog posts based on lxml, which
- follows the Author links in "Article Navigation" to fetch all articles
- fetches and parses all articles
- identifies the title, body, and date
- fixes hrefs to internal references where possible, including where the reference is to Overcoming Bias and redirects back to Less Wrong.
- fixes all the weird Unicode characters as best I can where I can make a plausible guess
- finds and adds the forward references in all blog posts
- caches all network operations in a very simple dumb way
- writes them all out as very simple HTML with a very simple HTML contents page, in a form that Calibre works well on.
I'll share the script when I have time to sort out publishing via Mercurial, or email me if you'd like a snapshot copy - paul at ciphergoth dot org.
Replies from: multifoliaterose↑ comment by multifoliaterose · 2010-11-20T17:10:29.691Z · LW(p) · GW(p)
Great to hear!
comment by Vladimir_Golovin · 2010-11-06T09:34:49.729Z · LW(p) · GW(p)
I'll throw together a python script to get the job done, and will post the result here.
LessWrong is written in Python, so instead of writing a scraper script (which I suppose you were going to do), you can become a volunteer, grab the code at GitHub, write a proper script that can access the database directly, and commit it into the LW codebase.
comment by Jordan · 2010-11-07T00:56:04.276Z · LW(p) · GW(p)
Hi all, thanks for the comments. I went ahead and wrote the scraper. I might do a proper PDF version, integrated into the LW codebase once I get some time.
Replies from: Vladimir_Golovin, Document↑ comment by Vladimir_Golovin · 2010-11-07T06:18:40.775Z · LW(p) · GW(p)
I haven't checked all the scraped sequences, but I saw at least one missing post: "Invisible Frameworks", which should be at the end of the Metaethics sequence according to the wiki index.
comment by imonroe · 2012-04-15T20:05:38.779Z · LW(p) · GW(p)
Just FYI, the link above (http://pwnee.com/Sequences/list.html) currently 404's.
comment by jb55 · 2010-11-23T00:17:59.015Z · LW(p) · GW(p)
I put together a repository for print-friendly versions of the Sequences. It consists of a pretty naive scraper which I feed into pandoc. It spits out markdown documents which I then convert to epub, pdf, etc.
I have the first two sequences completed and I plan on doing all of them eventually. Check it out:
comment by NihilCredo · 2010-11-07T19:41:41.171Z · LW(p) · GW(p)
There seems to be a relatively easy way to fix interlinking, at least within the same sequence:
1) Open the file with Notepad++ or any text editor of your choice.
2) Do a regex replacement to add an HTML anchor after every header, with the same anchor name as in the link in the header
3) Do a regex replacement to turn every link from /lw/tworandomcharacters/articlename into #articlename
I may get around to do it later.
Replies from: Documentcomment by RHollerith (rhollerith_dot_com) · 2010-11-06T18:49:01.956Z · LW(p) · GW(p)
Forgive my ignorance: has the author of the Sequences given permission for the distribution (e.g., over the public internet) of EPUBs and such of his work -- as opposed to people making EPUBs or such for their own consumption, which is not considered by most people to be "distribution" of a work?
Replies from: jsalvatier↑ comment by jsalvatier · 2010-11-06T19:12:32.984Z · LW(p) · GW(p)
I haven't seen him explicitly do so, but I imagine he would.
comment by MichaelAnissimov · 2012-07-06T02:51:23.367Z · LW(p) · GW(p)
This is currently broken... any chance of getting it fixed? Thanks for doing this!
comment by MichaelHoward · 2010-12-22T03:21:53.700Z · LW(p) · GW(p)
This has actually gone public, without any request not to say anything, so I trust it's OK to mention it to anyone who finds themselves here and doesn't know yet. I know I'd want to know! :-)
Eliezer has completed the first draft of his rationality book based on his two-year sequence of blog posting on Less Wrong, packed with hundreds of pages of novel content.
The manuscript is over 280,000 words long (over 500 pages) and has been split into two sub-books. The next steps are thoroughly editing the text and moving towards publication.
Yay! :)
comment by hwc · 2010-12-16T00:47:18.824Z · LW(p) · GW(p)
One point about e-book versions of HTML files: with restricted screen space and slow page-turns, you want less space between paragraphs. The following CSS rule indents paragraph, print-style:
p { text-indent:2em; margin-top:0; margin-bottom:0; }
comment by Paul Crowley (ciphergoth) · 2010-11-10T17:49:46.679Z · LW(p) · GW(p)
http://pwnee.com/Sequences/GetSequences.py gives me "Internal Server Error"!
comment by Relsqui · 2010-11-06T06:37:27.142Z · LW(p) · GW(p)
Now you've got me wondering what it would take to make an ereader-ready file out of them.
Replies from: Vladimir_Golovin, Risto_Saarelma, Jordan↑ comment by Vladimir_Golovin · 2010-11-06T07:59:38.981Z · LW(p) · GW(p)
The most important decision is the format. PDF support is pretty ubiquitous, but it's not reflowable (i.e. can't adapt to different screen sizes and user-adjusted fonts automatically), which looks bad on devices that have screens of different size than the size encoded in the PDF. Many devices implement some form of PDF reflow, which may work well for simple-layout PDFs (with no pullquotes or columns).
There's EPUB, a good reflowable open-source XML-based format, but it has its downsides too: not all ereaders support it, and, as I gather from the wikipedia page, the situation with linking is unclear -- which is important because the sequences are heavily interlinked.
There's also CHM (Windows help file format) which is both reflowable and linkable since it's based on HTML/CSS, but, as far as I know, few ereaders support it.
Based on my own experience, I strongly prefer EPUB. However I have no experience with its linking support.
I'd first try a linked EPUB and see how well its linking works on popular devices, or, as a second option, try a simple, sinlge-column, no-pullquotes PDF encoded for a 6-inch screen and see how well it reflows on various readers.
Replies from: humpolec, Jordan↑ comment by humpolec · 2010-11-06T10:14:44.238Z · LW(p) · GW(p)
PDFs are pretty much write-only, and in my experience (with Adobe Acrobat-based devices) reflow never works very well. As long as you use a sane text-based ebook format, Calibre can handle conversion to other formats.
So I recommend converting into - if not EPUB, then maybe just a clean HTML (with all the links retained - readers that support HTML should have no problems with links between file sections).
Replies from: Vladimir_Golovin↑ comment by Vladimir_Golovin · 2010-11-06T16:01:11.989Z · LW(p) · GW(p)
then maybe just a clean HTML
Yes, some readers (e.g. Pocketbooks) can handle HTML, but even the latest Sony readers cannot. Kindle does have HTML support "via conversion" but I don't know if it can correctly convert 600 or so interlinked documents.
Replies from: humpolec↑ comment by humpolec · 2010-11-06T17:33:39.006Z · LW(p) · GW(p)
600 or so interlinked documents
I was thinking more of a single, 600-chapter document.
(Actually this is why I think Sequences are best read on a computer, with multiple tabs open, like TVTropes or Wikipedia - not on an e-reader. I wonder how Eliezer's book will turn out...)
↑ comment by Jordan · 2010-11-06T08:20:26.894Z · LW(p) · GW(p)
Thanks for the info!
I suppose for PDFs we could just have a list of various widths available.
Replies from: Vladimir_Golovin↑ comment by Vladimir_Golovin · 2010-11-06T09:25:36.144Z · LW(p) · GW(p)
Yes, but you'll still have to change the page size and recompile each of the 600 or so PDFs -- this is a huge amount of work if you're planning to do it manually. Generating PDFs for different screen sizes automatically (e.g. using a Python library) would be a better solution. I'm not familiar with PDF generation under Python, but I did a quick Google search and here's what I found:
http://www.devshed.com/c/a/Python/Python-for-PDF-Generation/
http://www.reportlab.com/software/opensource/
↑ comment by Risto_Saarelma · 2010-11-08T09:59:05.469Z · LW(p) · GW(p)
I've had success turning texts in various formats into EPUB files using Calibre.
ETA: Tried Calibre for making an ebook of the scrapings. Downloaded each sequence file, plus the index html, into the same directory. Modified index to point to local files instead of fully qualified URLs. Pointed Calibre at the index file, and it slurped the actual sequence files nicely. Resulting epub looks fine, corresponds to a 1300 page physical book and includes the inline images.
Replies from: Risto_Saarelma↑ comment by Risto_Saarelma · 2010-11-10T21:12:44.362Z · LW(p) · GW(p)
Made a script to do this.
Install the prerequisites: apt-get install wget calibre tidy
, or whatever works on your favorite OS.
Then do
#!/bin/bash
TMPDIR=$(mktemp -d)
pushd $TMPDIR
wget -H -np -nd -k -p -r -l 1 http://pwnee.com/Sequences/list.html
tidy -m *.html
ebook-convert list.html lesswrong.epub
popd
cp $TMPDIR/lesswrong.epub .
↑ comment by Jordan · 2010-11-06T07:30:21.176Z · LW(p) · GW(p)
Once you've harvested the text it would be straightforward to make a PDF, but I'm not sure how many ereaders support that format.
Replies from: CarlShulman, Relsqui↑ comment by CarlShulman · 2010-11-06T08:42:42.564Z · LW(p) · GW(p)
You can convert a pdf for kindle reading automatically, but the formatting winds up a bit spotty.