/freereolen

Primary LanguageShellGNU Affero General Public License v3.0AGPL-3.0

freereolen

IMPORTANT NOTE

The script currently doesn’t work, as ereolen.dk has changed their site. The way it now works is by fetching a binary blob and decrypting it client-side. Reverse engineering shouldn’t be too hard, but I haven’t had time for a good look yet.

Purpose

Turn books from ereolen.dk into proper ePub files, to make it possible to read borrowed books with any ePub reader. ePubs created with freereolen have been tested and found working in FBReader on Android and Linux, on a Barnes&Noble nook (gen1) and on a Kobo Libra H2O.

Works by grabbing pages and resources using curl, doing a bit of magic and converting it all into an ePub using zip and ePub XML templates rendered with bash.

Features

  • automagically creates ToC even for (some) really broken books
  • i18n layer to translate ToC names into local languages
  • fetches external resources
  • lints HTML using tidy

Dependencies

  • awk
  • curl
  • dos2unix
  • grep
  • sed
  • tidy

Usage

See also help text:

./run.sh

Known bugs

  • doesn’t work with all books, especially graphics-heavy ones (e.g. graphic novels made from images and associated text)
  • will often choke (on purpose) on links to external sites, which will need to be removed or whitelisted

Help wanted

  • CSS tidy
  • support for overdrive.com (as English language books are often only available there)
  • support for automatically fetching books instead of having to manually go and find the correct URL