Update: It is now possible to buy an official subscription to The Guardian and The Observer. The rest of this post is now largely of historical interest if you just want The Guardian on your Kindle, but I’ve left the rest of the content unchanged for people who are interested in how I generated my unofficial version.
If you just want a copy of today’s copy of The Guardian or The Observer for you Kindle, you can download one from this automatically generated page. This post describes the script that generates that generates the file and the motivation for it.
Since moving to Switzerland, I’ve found that I really miss being able to get The Guardian in the morning on my way into work. Unfortunately, reading the website on a phone (or any other device) is no substitute if you’re relying on data over the mobile phone networks – one really wants all the articles cached for fast navigation through the paper. The solution for this should be my shiny new Kindle, but sadly subscriptions to The Guardian aren’t available in the Kindle store. (There are many other papers available.) Fortunately, The Guardian has an excellent API for accessing its content, and the lovely interface produced by Phil Gyford for reading the paper in a cleaner interface suggested that I could similarly generate a bare bones version of the paper for my Kindle. I believe that this is permitted under the terms and conditions of the Guardian Open Platform, since I’m (a) including the advertisement linked to from each article, (b) linking back to the original article and (c) acknowledging that the data is supplied by that service. If I’ve misunderstood, and in fact this is not allowed, please let me know.
To generate a book in the Kindle’s preferred format, you have to generate a .opf file describing the contents of the book, which refers to other files describing its text, images, structure, etc. Then you can run a binary called “kindlegen” to generate a .mobi archive from those files that will work on your Kindle. (The samples in the kindlegen archive and the Amazon Kindle Publishing Guidelines are quite sufficient to figure out how to do this.) My script to generate the .opf and supporting files is far from elegant, but I’m very happy with the results that it produces – it’s a really lovely reading experience. You can use the normal page forward / back buttons to go from page to page, while the left and right buttons on the five-way skip to the next article’s headline. This means you can skip quickly through the articles that you aren’t interested in, but each article you do want to read is presented very clearly on the amazing eInk display:
There are a few articles for which the API won’t return the text, saying that rights for redistribution are not available – I’m still including the other metadata for these article and the link to the original article, so that you know what’s missing:
At the end of each article is the advertisement image that’s included – this is to comply with the requirements of the Guardian Open Platform:
You can download the generated .mobi file for today’s Guardian (or The Observer on Sunday) from this page:
You can bookmark that page in your Kindle’s web browser. Then, whenever you select the bookmark and then “Reload”, then it’ll be refreshed with a link to that day’s generated edition of the newspaper for your Kindle, which you can download straight from that page.
If you’re interested in this project, or have any comments or suggestions, you can contact me by email at:
… or leave a comment below. The script for generating this version of The Guardian is available at github.