NiklasGollenstede / epub-creator

Firefox add-on that creates .epub books from the about:reader and overdrive books

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ePub Creator -- offline e-books in a single click

ePub creator allows you to save web pages opened in the browser as offline ePub e-books. It currently supports:

  • any web page that can be opened in Firefox's Reader Mode, which should work for most text-based websites
  • books opened in the online reader of the library service overdrive.com, which cooperates with many local libraries worldwide

How to create/save books:

  1. open the web page or book you want to save
    • on overdrive, go to "Loans" and choose "Read now in browser"
  2. click the extensions icon (blue book with green arrow, should be at the top right of the browser, see screenshot)
  3. wait while the animation on the icon is spinning
    • this can take a while if the e-book contains many pictures etc.
    • for Reader Mode pages, it will prompt for the books author
  4. save or open the e-book when prompted

Whether saving content with this extension is legal or not depends on the content and your local legislation. Checking that is your own responsibility. Just because you can do it doesn't mean you should.

What you get & Troubleshooting:

  • For general web pages, Mozilla's Readability.js is used to extract the content. Since that is the same software component used by Firefox to generate the Reader view, the result should generally be the same as well. All resources (e.g. images) that show up there should also be included in the ePub book. If parts of the website are missing in the book, please check whether they show up in the reader mode. If not, there is little this extension can change about that. Also note that some sites load e.g. images on demand, usually when scrolled to; before that, they won't be captured by the reader view or this extension.
  • Books from overdrive.com are not simply downloaded, but the content is parsed from the open book. The ToC is rewritten, most of the formatting is stripped and everything gets repacked. While images are generally still included, their sizing might be off on some readers, rendering this quite useless for comics and the like.
  • If you have a problem that is not explained by the limitations above, please check for and/or open an Issue on GutHub.

Permissions used:

  • Display notifications: Only as direct consequence of clicks on the icon or to report errors
  • Access your data for all websites: Download page content if you choose so
  • Access recently closed tabs: Remove own popups from the recently closed windows list

Development builds --

Development builds are automatically created on every commit with appveyor and published as release on GitHub.
These build use a different id (-dev suffix), so they are installed as additional extension and do not replace the release version. This means that:

  • you probably want to disable the release version, while the development version is active
  • any options set are managed individually (which also means that pre-release versions can't mess with your settings)
  • they never update to release versions, but
    • they update themselves to the latest development version
    • every release version has a corresponding development version (the one with the same prefix and highest build number)

How to Build

Preparation

  • git clone https://github.com/NiklasGollenstede/epub-creator && cd epub-creator
  • npm install

Testing and packing

To build, run npm start -- "<options>", where <options> is an single optional JSON5 object.

Without options it creates a release build for Firefox in the build/ directory. The .zip file is ready to be uploaded on AMO, and the build/ directory or the .zip file can be loaded via about:debugging.

To test the extension in a fresh Firefox profile, use the {run:1} or {run:{bin:'path/to firefox/binary'}} option.

To build for Chrome (which e.g. doesn't support .svg icons), add the {chrome:1} option.

AMO code review notes

The exact version of the minified JSZip file can be found here: https://github.com/Stuk/jszip/blob/v3.1.5/dist/jszip.min.js.

About

Firefox add-on that creates .epub books from the about:reader and overdrive books

License:Mozilla Public License 2.0


Languages

Language:JavaScript 100.0%