How to create an e-book from a website

If you have an e-book reader, sooner or later you’ll want to read some web content on it: lots of wiki pages, a tech manual in HTML, a collection on threads in Stack Overflow, a whole blog, etc. This article shows how to generate a MOBI e-book from a bunch of HTML files, with a short Ruby script.

If you want to skip the theory and put your hands straight into code, take a look at my sample parser script on Github.

The tools

How KindleGen works

KindleGen creates books in the binary MOBI format (actually, Amazon’s AZW format is just MOBI with DRM).

Although we can generate an ebook from a plain HTML file, if we want to include navigation, cover, a table of contents, etc. we need to create a bunch of HTML files (one per chapter) and a OPF file. This one is just a XML file which contains the book’s metadata (author, title, publisher, etc.) and content structure.

In KindleGen’s zip file you can find an example of an OPF file, ready to be processed with this tool.

Continue reading →

Read more → No comments Tags: , , , .

Torchlight: a casual RPG?

Torchlight, Runic Game‘s first game, is an action RPG which has received pretty good critics since its release on October 2009. And it’s no surprise, this game is real fun! But one of the things that did surprise me was its “casual touch”. From the very beginning you realize that people who never had played an action RPG before could actually play Torchlight. This was done on purpose, of course.

Read more → No comments Tags: , , .