View Full Version : Presenting EPUB and/or EPUB content over internet to visitors - automatically?


carlosbcg
02-21-2013, 02:03 AM
I wasn't quite sure what to call this thread.

What I would like to do is this...

My EPUB (my first) is getting too big to be read on one HTML web page. Or rather I should say that the content of my EPUB is getting too big since in truth I don't upload the EPUB but rather the content coverted into HTML.

Currently I am simply converting the markdown in which it is mostly written into a stand alone HTML file and uploading that to my web server. All well and good...well...except for the fact that there is no easy navigation of the content other than scrolling up and down this growing HTML single page (not so good).

I want to make it as easy as possible for visitors to read the content of my EPUB through their browsers (whether I serve up an actual EPUB or not doesn't really matter with respect to that as long as visitors can read the content somehow).

Hmm...let's see...ideally...I would want to upload my EPUB (not the HTML in it) to my web server and then when a visitor clicks on a link to read it, their web browser would simply present the EPUB in a nice browser EPUB reader like Readium without having to install anything (but you have to download a plugin for that one and it's not available in IE).

But in Googling there doesn't seem to be such a thing. I did find a site that has apparently embedded Readium where one can indeed read an EPUB (epub 3 no less) by simply clicking a link but like I said..it's not available for IE which is a show stopper).

The other thing I have found is what are called Javascript enabled slide shows (i.e. Slidy, Slideous, S5, and I think DZSlides) which may be able to act as cheap ebook readers...of sorts.

I would have to make some changes to the EPUB underlying HTML content (no big deal...I would create a script to automatically do that for me), upload the content, and present it through the slide show. These slide shows come complete with arrow key navigation and some other niceties.

Does anyone have experience presenting the content of an EPUB through a slide show through a browser LOL?

Any comments or ideas on any of this?

Carlos

PS. I think I figured out what these great big gaps in the appearance of posts is. I have set up my browser to not load images automatically and had forgotten that I had done that so I was being left with the impression that this forum was presenting itself rather strangely when in fact it was me all along LOL.

dgatwood
02-21-2013, 02:20 AM
At one point, I wrote a scrolling-style EPUB reader entirely in JavaScript as a Safari extension (mainly as a gag and to prove that it could be done), and except for the fact that it took many, many seconds to unzip the ZIP file, it did actually work, mostly.... But for your sanity, I don't recommend that approach. :D

I'd go with something much simple. For each source HTML page, create a static copy of that page in which you throw the book's TOC into a div and float it left, and throw the source HTML page into another div with a wide left margin.

carlosbcg
02-21-2013, 02:27 AM
At one point, I wrote a scrolling-style EPUB reader entirely in JavaScript as a Safari extension (mainly as a gag and to prove that it could be done), and except for the fact that it took many, many seconds to unzip the ZIP file, it did actually work, mostly.... But for your sanity, I don't recommend that approach. :D


Impressive!


I'd go with something much simple. For each source HTML page, create a static copy of that page in which you throw the book's TOC into a div and float it left, and throw the source HTML page into another div with a wide left margin.

I may just do that but I think I will try one of these slide show thingies as they seem to be quite functional.

Of course their TOC is a bit simplistic, somewhat inconvenient and likely unworkable for any long TOC, and certainly not to my liking.

Thanks for the suggestions!

Carlos

Jellby
02-21-2013, 04:37 AM
How about Ibis Reader (http://ibisreader.com)?

Or the ones mentioned here (http://blog.threepress.org/2010/02/06/three-javascript-epub-readers/)?

AlPe
02-21-2013, 11:34 AM
Monocle:

http://monocle.inventivelabs.com.au/
https://github.com/joseph/monocle

carlosbcg
02-21-2013, 08:47 PM
How about Ibis Reader (http://ibisreader.com)?


The problem with Ibis Reader is that a visitor to my site must download my ebook first and then upload it to Ibis Reader. Not quite what I had in mind.

I want a visitor to come to my site, click on a link (or visit a specific URL at my site) such that the EPUB just opens for them in a very nice reader that requires nothing to install, download, or otherwise.

I mean that should be possible given that the content of my EPUB is just HTML5 (well...XHTML5 at least).

The main difference between straight HTML5/XHTML5 served to visitors and an EPUB served up that I can see is the table of contents and the cover page. An EPUB has all that while HTML5 doesn't (at least unless I include it). Oh and also the nice GUI interface that allows one to use keys and otherwise move through the ebook easily. That too is way different than just HTML5/XHTML5.

I'm still looking at the other thing you suggested.

If their license allows it I may just download the Readium source code and fenaggle it into running at my server automatically. Don't know how easy that would be...don't even know what language it's written in...but if it's PHP and Javascript that should be possible at least in theory. It's a very nice reader.

Carlos

carlosbcg
02-21-2013, 09:00 PM
Or the ones mentioned here (http://blog.threepress.org/2010/02/06/three-javascript-epub-readers/)?

Some of the Javascript readers look very promising and exactly in line with what I wanted.

No downloading, installation, or otherwise on the part of a visitor who wants to read my EPUB. Just click a link or image of the EPUB and away they go to read.

Nice.

I do wonder though if the license for some of the readers is a problem. For example rePublish is GPL. Does that mean that my EPUB must be GPL'ed too? The GPL license is kinda of a virus in that sense. It normally takes over whatever you create if any of it is GPL (I think).

I just saw one that has an MIT license that might fit my needs.

Thanks for the heads up on these Javascript readers! Much appreciated.

Carlos

carlosbcg
02-21-2013, 09:06 PM
Another concern with the Javascript readers is that so many of them seem to be...well...really old and not updated much at all.

js-epub is from 3 years ago!
epubjs is from 2009!

My eBook is EPUB3. Not sure that would be a problem.

I'll have to play around with some of these and look at their source code.

Carlos

carlosbcg
02-21-2013, 09:35 PM
Monocle seems to be exactly what I need except for it not working as is, under IE.

A visitor can make it work by downloading and installing Google Chrome Frame though such a thing DOES go against my desire to present my EPUB(s) to visitors without them having to install anything.

Carlos

meme
02-22-2013, 11:44 AM
If you are just looking to convert your EPUB into an HTML that is viewable on the web, then you can use calibre to convert it to the ZIP format. The Sigil User Guide in my link is an example of converting from EPUB to HTML online using this approach.

Jellby
02-22-2013, 01:36 PM
The problem with Ibis Reader is that a visitor to my site must download my ebook first and then upload it to Ibis Reader.

Not necessarily, you could create an OPDS catalogue, or put a link that directly adds the book to the user's Ibis Reader account. Have a look at my site (http://djelibeibi.unex.es/libros/), I have both options there. The drawback of the link is that if the book already exists, it gets duplicated.

Still, it's probably not exactly what you are looking for, as it requires the user to go to an external site and create an account (even though it's as simple as writing an email and password, no additional info needed, not even a confirmation email, I believe).

Monocle looks quite interesting, but it doesn't read the ePub directly, you have to extract it first...

DaleDe
02-22-2013, 04:53 PM
There are things like ePubReader here in this forum for some browsers but I know of nothing for all possible browsers. However, you can explain how the user can fix it themselves. Browsers have a setting to specify external programs that can be used for certain extensions. You can use this browser feature to plugin the ePub reader of your choice.

Dale

carlosbcg
02-22-2013, 07:49 PM
If you are just looking to convert your EPUB into an HTML that is viewable on the web, then you can use calibre to convert it to the ZIP format. The Sigil User Guide in my link is an example of converting from EPUB to HTML online using this approach.

It's not that though thanks for the tip!

I can write, breath, and eat HTML. I even have scripts that take my markdown (in which I write my content) and spit out nice HTML complete. I even have created scripts that even FTP such things to my server automatically apart from my normal FTP program through SSH.

My desire is not just to be able to present the HTML. I can do that now.

My desire is to be able to present it as an ebook with all the nice, user friendly ability to read the HTML as a book on the browser screen with keyboard navigation and the like. Just like you find in many EPUB readers.

But also where it is cross browser compatible (able to be seen and used under at least Firefox, Chrome, and Internet Explorer).

I mean I can insert next and previous buttons at the bottom of my HTML sections and all that but that's not the same thing as the nice GUI type of interface that EPUB readers present.

Carlos

carlosbcg
02-22-2013, 07:56 PM
Monocle looks quite interesting, but it doesn't read the ePub directly, you have to extract it first...

I don't what happens underneath exactly but from a user standpoint they don't have to do a thing other than click on the link or photo of the EPUB to start reading it under Monocle control.

Here is an example of Monocle in action -> http://monocle.inventivelabs.com.au/books/dubliners

No need to do anything at all. Just go to the link (or click on it from within a site).

The reason it's not compatible with IE is that it uses some kind of two column CSS that IE does not do. But since I don't need two column anything I am hoping I can look at the source and just strip out the parts that make IE choke.

I mean things can't be this seemingly difficult. EPUB is just XHTML underneat and every browser worth anything these days can read XHTML. Throw in some simple Javascript and voila...one should be able to have a cross browser, fully compatible, simple EPUB reader.

Carlos

Jellby
02-23-2013, 03:42 AM
I don't what happens underneath exactly but from a user standpoint they don't have to do a thing other than click on the link or photo of the EPUB to start reading it under Monocle control.

But does it actually use the EPUB? Or is it already extracted and pre-chewed in the server? From the user's perspective it's just clicking on a link and enjoy, that's right, but I believe there's more work on the page creator/mantainer part than just adding EPUBs to a list.

[quote]I mean things can't be this seemingly difficult. EPUB is just XHTML underneat and every browser worth anything these days can read XHTML. Throw in some simple Javascript and voila...one should be able to have a cross browser, fully compatible, simple EPUB reader.[quote]

You are right, it shouldn't be that difficult, at least if you don't aim at supporting things like headers/footers.

Some time ago I wrote a quick-and-dirty script (for linux) that allowed me at least to test an EPUB in the browser and check formatting and TOC. If you can do some programming, maybe you can turn it into some server-side scripting code, or find someone who can.

dgatwood
02-23-2013, 02:07 PM
I mean things can't be this seemingly difficult. EPUB is just XHTML underneat and every browser worth anything these days can read XHTML. Throw in some simple Javascript and voila...one should be able to have a cross browser, fully compatible, simple EPUB reader.

It's easy to get halfway there, with a reader that scrolls. Doing pagination in a normally scrolling browser window is a good bit harder. There are CSS tricks that might make it feasible to at least support full justification on the last line of the page, but it would still be a lot of code to handle splitting paragraphs correctly.

carlosbcg
02-23-2013, 06:32 PM
...but it would still be a lot of code to handle splitting paragraphs correctly.

And if I may say so...a lot of work too!

That's why I was looking for a pre-made, cross browser solution of which I have yet to find just the right one though I may be able to do something with chunks of code from existing Javascript readers (where the license allows me to do that).

I haven't really run with this just yet as I am still working on finishing up my EPUB, content wise, which also involves a lot of work.

Once I finish it though I will come back to this issue of figuring out how best to present it for online reading through a browser which I have to do.

This thread was my attempt to find something quick without taking too much time out to implement it.

Carlos

carlosbcg
02-23-2013, 06:46 PM
Some time ago I wrote a quick-and-dirty script (for linux) that allowed me at least to test an EPUB in the browser and check formatting and TOC. If you can do some programming, maybe you can turn it into some server-side scripting code, or find someone who can.

That's very gracious of you to provide that script Jellby. Thanks for offering to let me use it. I may play with it some or do something with parts of it (like getting the TOC which I have been looking to do on my own through a script).

But what I may do is just use some of your logic and implement it in a server side PHP script which should be able to do the same thing I think.

Carlos

theducks
02-23-2013, 07:22 PM
There is a plugin for Firefox that displays EPUB
You need 2 things: Firefox and the Plugin
Diehard IE users, and others are less lucky ;)

roger64
02-24-2013, 04:58 AM
Hi

I just accidentally found - again - a Firefox extension which works pretty well at least to display EPUB (it can do other things but I did not try them). I had used it previously and thought it was dead. This version is said to be from the 9th of February 2013. It's really worth a try.

https://addons.mozilla.org/en-US/firefox/addon/lucifox/

DaleDe
02-24-2013, 11:16 AM
Hi

I just accidentally found - again - a Firefox extension which works pretty well at least to display EPUB (it can do other things but I did not try them). I had used it previously and thought it was dead. This version is said to be from the 9th of February 2013. It's really worth a try.

https://addons.mozilla.org/en-US/firefox/addon/lucifox/

There is also ePUBReader here on this forum. To avoid finding things by accident try our wiki.

Dale

roger64
02-24-2013, 07:35 PM
There is also ePUBReader here on this forum. To avoid finding things by accident try our wiki.

Dale

Thank you. I had a closer look on the wiki and did indeed find Lucifox but I added it in a new paragraph intended for web browsers (3). :)
Here is a view of the same file from ADE 1.72 (1) and another from Lucifox (2) to compare with. You may have to adjust the zooming and window size.

I think it's a decent choice.