Code Monkey home page Code Monkey logo

epub-creator's Introduction

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 I can change about that.
  • 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.

epub-creator's People

Contributors

niklasgollenstede avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.