GithubHelp home page GithubHelp logo

futurepress / epub.js Goto Github PK

View Code? Open in Web Editor NEW
6.2K 205.0 1.1K 27 MB

Enhanced eBooks in the browser.

Home Page: http://futurepress.org

License: Other

JavaScript 99.85% HTML 0.09% TypeScript 0.06%
epub

epub.js's Introduction

futurepress

Running the project

  • In one terminal window $ python app.py dev
  • In a second (if you are working on sass styles) $ compass watch -c config.rb

Test Author Login

Unittest

  • Run $ python run_tests.py

epub.js's People

Contributors

ajrenold avatar alikazemkhanloo avatar bielskij avatar bill-titus avatar bjdmeest avatar chok avatar christiaan avatar dsk7 avatar fchasen avatar gerhardsletten avatar gimox avatar imefisto avatar jacksonrayhamilton avatar jakehartnell avatar jdormit avatar jessiehernandez avatar johnfactotum avatar krushton avatar lest avatar maggie44 avatar markwatkins2 avatar matewilk avatar mifrea1 avatar mikkelvp avatar nbarbosa avatar nielslanting avatar pmstss avatar rafaelsaback avatar stevekchiu avatar tarungupta-in avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epub.js's Issues

eBooks work locally, but not online

I would greatly appreciate any help here.

I setup epub.js as per documentation and examples and it works superbly on my PC locally (Windows 8), but for some unknown reason to me, it is perpetually loading when I try to open eBooks online. Uploaded all files by ftp transfer to the hosting server.

Am I missing something here? I am really perplexed and a bit lost at this point.

Allow printing

Currently, the reader doesn't print... or sometimes it does, but it produces weird things. We could build a plugin to allow or disallow printing. I think it is something we should support.

Not working on IE Browser

ePub Reader is not supported to Internet Explorer. I am currently using IE 8.

Webpage error details on IE:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E)
Timestamp: Mon, 23 Sep 2013 07:29:40 UTC

Message: Object doesn't support this property or method
Line: 874
Char: 42
Code: 0
URI: http://......//js/epub.min.js

Local storage and getting new versions of the book

Having changed the table of contents, it has been notice that if cached data is not deleted from the browser, the old 10 item table of contents still shows up. In other words, currently there are problems related to checking if a newer version of the book is available. Any ideas?

The good news is local storage is working somewhat well.

uploding in server

When am uploaded in server just loading the title y?

please help

advthanks.......

Full screen mode

PDF.js has a nice full screen mode which would be nice to implement in our project. It's essential to allow the creation of a minimal distraction reading environment.

Image resize for large images needs work.

Perhaps I'm implementing the smart images hook wrong, but either it needs work because it doesn't work—or it needs better documentation. How exactly do we use hooks? In the index.html document?

Demo issues TOC

Why does the table of contents only go to chapter 10? It seems to work perfectly in other versions.

Changing font-family and size

How can I change these with js? Changing zoom messes the presentation and I can't change css selectors of the books.

Relative URLs inside zipped (contained) epub

In some epubs there are relative links to resources and css as ../Styles/Style.css.
In this way, those resources are not loaded because the URL searched is not valid.

A possibile solution is: inside Renderer replace the "../" inside the url parsers:

EPUBJS.Renderer.prototype.replaceHead
EPUBJS.Renderer.prototype.replaceResources

resources.forEach(function(link){
        var src = link.getAttribute("href"),
            src = src.replace("../",""), 
            full = this.book.settings.contentsPath + src;

Continuous

What can I do to get a continuous page flow like evince in linux or like any pdf reader ?

Thank you in advance

Summer Tasks

Core:

  • Replace event system
  • Deep linking / urls with in the book
  • Handle fixed sized epubs
  • Open compressed epubs
  • Test offline storage
  • Generic way apply and remember settings

Reader features:

  • Bookmarks
  • Annotations
  • Search

Settings page:

  • Font size
  • Single / Double page
  • Sign into annotator / hypothesis
  • Margins
  • Fullscreen

Hooks (plugins):

  • Better documentation of all the events
  • More examples

Enhancements:

  • Quizes as a hook / transclusion
  • TDO specific image / aside handling
  • Images with annotations

Distributions:

  • Wordpress plugin?
  • GH pages
  • Self hosted example
  • Library example?
  • Script to create a appcache manifest from epubs manifest

which js libs to include for .epub? "zip not defined"

Hi,
I'm trying out the demo using one of my own .epub books. It seems to recognize it is a zipped up .epub file and be attempting to unzip it but I get the error "Uncaught ReferenceError: zip is not defined" from zip.min.js.

Can you provide the documentation for how to use .epub files?

Thanks

SVG images source is not correctly loaded inside zipped epub

If you have an tag inside an svg (usually, in the front cover of the book), the image is not loaded because the url of that tag is not parsed.

A possible solution: add in Renderer a new function:

EPUBJS.Renderer.prototype.replaceSVGImages = function(callback){
    var srcs, resources, count;
    var store = this.determineStore();

    if(!store) {
        if(callback) callback();
        return false; 
    }

    srcs = this.doc.querySelectorAll('image');
    resources = Array.prototype.slice.call(srcs);
    count = resources.length;


    resources.forEach(function(link){
        var src = link.getAttribute("xlink:href"),
            src = src.replace("../",""), // mod by panurge
            full = this.book.settings.contentsPath + src;

        store.getUrl(full).then(function(url){
            link.setAttribute("xlink:href", url);
            //link.src = url;

            link.onload = function(){
                count--;
                if(count <= 0 && callback) callback();
            }

        });

    }.bind(this));

    if(count === 0) callback();
}

Yo should call the function at the beginning:

EPUBJS.Renderer = function(book) {
    this.el = book.element;
    this.book = book;

    this.settings = book.settings;

    book.registerHook("beforeChapterDisplay", 
        [this.replaceLinks.bind(this), 
         this.replaceResources.bind(this),
         this.replaceSVGImages.bind(this),
         this.replaceHead.bind(this)], true);

codeigniter

Hi
I'm trying to use this reader in codeigniter but it seems only the images and css load.
i tried the demo in standalone and in the CI structure. the standalone works fine and i can change the epub files but when in the CI framework, it doesnt show the book.
the paths are correct and like i said, the images and format/css are fine...

how can i go about this?

Several bugs #1 in Demo (Moby Dick)

I run Google Chrome on Win7.
Here are some bugs:

  1. The TOC of Moby Dick stops at chapter 10 although there are many more.
  2. Layouting when left pane is shown does not work (does not resize the rest ... e.g. the right arrow for turning pages is invisible).
  3. After playing a little bit with show/hide left pane, the keyboard navigation (pg next/prev) does not work anymore.

Thumbs up for Angular

Sorry, not really an issue, but give a +1 for going the Angular.js route...

"A framework (backbone / angular / ?) to use for our reader demo (which we suspect is going to start expanding quickly)"

Page specific URLs

Just loaded the demo Moby Dick book. It's really important I feel that each page have a url. You lose a huge amount of linking opportunity and the web needs specific links to work well.

The layouting does not work when left pane is shown.

The layouting does not work, when left pane is shown. The page should be more responsive. Currently when the side menu is open the right page and arrow becomes hidden. This isn't good because people may want to read with the table of contents open.

Demo is broken?

After changing the name of the project, it appears there is something wrong with the demo. Any guesses?

Bower support

It would be really nice if the library can be installed using Bower. Thanks!

Internationalization

People all over the world use epubs in many different languages. We need to support internationalization.

Renderer.walk 'undefined' error for children in some pages

Inside the walk method of the Renderer sometimes an error is thrown not finding
children. This causes the Renderer to block the code and not dispatch the pageChanged event (e.g. inside the prev or next page methods).

Possible fix:

children = node.children;
if (children && children.length)
   leng = children.length ? children.length : 0;
else
  return r;

Simple error on Contained ePub Example

The html code of the Contained ePub Example has a simple error, we need to add a space between onclick="Book.nextPage();" and class="arrow" seems this is making the example not working.

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.