Build a EPUB from
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

UPDATE: Ra has ended

No updates are planned and an EPUB containing all chapters, the original ending and appendices is available. Go to and download it from there.

What is this?

This script prepares a EPUB version of qntm's book Ra by scraping the website.


  • perl >= 5.13.2 (although could be made to work on older versions)
  • HTML::TreeBuilder >= 5
  • Calibre (you don't have to start its interface, but you need to be able to run the ebook-convert executable)

How it works

  1. Run perl
  2. It downloads all chapters it can find, applies minor fixes and joins them in a single file ra.html
  3. It then runs ebook-convert from Calibre to build ra.epub from ra.html


While building an e-book from is okay, the resulting ra.epub is not redistributable.