|
|
Thread Tools | Search this Thread |
06-27-2021, 08:41 PM | #1 |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
Is there a Calibre equivalent ebook reader app in Android and iOS, that can read
I prepared an ebook that loads a javascript module file and it works ok with Calibre.
As I understand Calibre reader is not available on Android, and iOS. (I'm aware of the Calibre Companion tool to connect to Android, and iOS devices) I'm looking for an equivalent ebook reader on Android and iOS, that can read an ebook with javascript modules. I installed a long list of Apps for Android, but most of them do not work ok. The following ebook readers do not view the ebook file properly: - FBReader - Lithium - eReader - Rakuten Kobo - Reading Now - Libera Reader The ebook reader KotobeeReader, can load a javascript module file, but it has some other problems. I installed the CalibreBox app but I could not operate it, and I'm not sure if it is an ebook reader or a complementary tool like Calibre Companion. Is there an Calibre equivalent ebook reader app in Android and iOS, that can read ebook with javascript module (ES6)? Thanks, Avner |
06-27-2021, 08:45 PM | #2 |
creator of calibre
Posts: 44,289
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use the calibre content server, it has a builtin reader that is based on the same codebase as the calibre viewer.
|
Advert | |
|
06-28-2021, 07:39 PM | #3 | |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
Thanks kovidgoyal,
I tried running Calibre Content Server on Android and it does not view the ebook properly, compared to Calibre on Linux (which does view the ebook properly). So I ran Calibre Content Server on the Linux machine itself, to verify that it runs properly, and it also does not view the ebook properly, compared to Calibre on Linux. I run the Calibre, and enable Calibre Content Server like so: Code:
calibre button "Connect/share" Select "Start Content server" [192.168.1.75 port 8080 HTTP] I do see a list of books, so that part is ok. I then open a specific ebook that opens well with Calibre, but I see errors in the browser: Code:
There was an error in the JavaScript from within the book 3 srcdoc:27048:47 WARNING: column layout broken, probably because there is some non-reflowable content in the book whose inline size is greater than the column size {"col_size":550, "gap":41, "scrollWidth":1734, "ncols":3.003384094754653, "desired_inline_size":undefined} 192.168.1.75:8080:481:17 Quote:
Is there manual on how to run and debug the Calibre Content Server? Thanks Last edited by avnermoshkovitz; 06-28-2021 at 07:41 PM. |
|
06-28-2021, 10:25 PM | #4 |
creator of calibre
Posts: 44,289
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's a warning, not an error, and has to do with screen sizes. What actual error did you find?
|
06-29-2021, 06:08 PM | #5 | |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
Ok, to be exact, the error is:
Code:
Failed to resolve module specifier "./mydir/myscript.js". Invalid relative url or base scheme isn't hierarchical I think that the problem is more general (and the root cause is not Calibre Content Server) I think that the Calibre Reader and Calibre Content Server are using different technology stacks. I'm not familiar with both tools, but it looks like:
Quote:
Do I need to do something extra for Calibre Content Server to work the same as Calibre Reader? Thanks, Avner |
|
Advert | |
|
06-29-2021, 10:07 PM | #6 |
creator of calibre
Posts: 44,289
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It does work the same, you insist on using javascript modules, that's your problem. I suggest you not do that, and you will be fine.
|
06-30-2021, 04:02 AM | #7 |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
Oh, is this a limitation?
I do use modules. I use this code, with the modules, because I re-used code that works with a webserver. If I need to adjust the existing code to not use modules (but if this is the only way, I will do it). I did not know that this is a limitation. I use Calibre Reader, with the modules, and it works ok. So I expected CalibreContentServer to work the same (because you said that it uses the same code). Is there:
Thanks, Avner |
07-11-2021, 11:03 PM | #8 |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
Hi,
I transpiled m the ES6 modules using Webpack and Babel into a bundle.js file. So there is no more use of ES6 modules. I recreated the ebook and I can view it properly on the desktop. A video recording of the ebook working ok can be seen in: https://drive.google.com/file/d/1nWv...ew?usp=sharing But I can still not view it in mobile. I run the Calibre, and enable Calibre Content Server like so: Code:
calibre button "Connect/share" Select "Start Content server" [192.168.1.75 port 8080 HTTP] I select the ebook that opens well with Calibre on desktop, but I see errors in the browser: Code:
overrideEventListenerPrototypes/EventTarget.prototype.addEventListener@webpack://lib1/./main.js?49:10 https://drive.google.com/file/d/1urn...ew?usp=sharing Thanks |
07-11-2021, 11:06 PM | #9 |
creator of calibre
Posts: 44,289
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Figure out what it is in your javascript the browser doesnt like and fix it.
|
07-12-2021, 03:17 AM | #10 |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
I started calibre in debug mode, and in the log file I see the following error:
Code:
... ERROR: webpack://lib1/./gui/SceneBar.js?:199: Fetch API cannot load clbr://internal.sandbox/view_sites. URL scheme "clbr" is not supported. ERROR: webpack://lib1/./gui/SceneBar.js?:199: Uncaught (in promise) TypeError: Failed to fetch INFO: webpack://lib1/./loaders/FileZip_withJson.js?:56: BEG setZipLoaderInstance Code:
window.location.origin + '/view_sites'; Code:
clbr://internal.sandbox/view_sites From your experience, do you know if there is anything that can be done on the browser side in mobile to - allow using window.location.origin?, or - workaround window.location.origin to load another page, by other means? Thanks |
07-12-2021, 03:33 AM | #11 |
creator of calibre
Posts: 44,289
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No you're really not going to be able to implement navigation via javascript. What is it you are actually trying to do?
|
07-13-2021, 10:19 PM | #12 |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
Ok, I was able to get by without navigation in javascript.
I'm trying to run some html5+javascript+css code in mobile in stand-alone. The user:
the ebook can viewer successfully via:
A short clip that shows how the button responds to Calibre Content Server in the desktop, can be see in here: https://drive.google.com/file/d/1hff...ew?usp=sharing I want to make it work similarly, on mobile. I don't know if this is typical operation of an ebook. But, if it will work on mobile it will be very nice, and I will be very happy Thank you! |
07-13-2021, 10:25 PM | #13 |
creator of calibre
Posts: 44,289
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
What error do you get when you try to do it? Most likely you are running into cross site restrictions since ebook content is displayed in a sandboxed iframe
|
07-14-2021, 06:56 AM | #14 |
Connoisseur
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
|
Have you tried the free Gitden reader for android and IOS? A PDF reader add-in is also available. You can find a description here: https://www.print2eforms.com/gitden-reader/
|
07-15-2021, 12:38 AM | #15 |
Member
Posts: 22
Karma: 10
Join Date: Jun 2021
Device: Any ereader for Android or iOS
|
I start calibre in debug mode, connect the phone via usb, and debug with chrome devtools.
I don't see any errors:
In EPUB/package.opf, I see an option for another book reader: Code:
<meta property="ibooks:interactive">true</meta> The problem can be seen in the following clip: https://drive.google.com/file/d/1vuX...ew?usp=sharing
I prepared a minimal example that shows the problem. The epub can be downloaded from here: https://drive.google.com/file/d/1UuB...ew?usp=sharing kovidgoyal, can you please take a look at the attached ebook? It is very small (~233 KB) but is enough to demonstrate the problem. Thank you! |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Are there any iOS reader app that understands Calibre bookmarks? | georgehuang | Calibre | 5 | 11-05-2020 10:54 PM |
Announcing Qurika - a Beautiful 3D eBook Reader for Android and iOS! | jacob_qurika | Self-Promotions by Authors and Publishers | 43 | 05-19-2019 07:43 PM |
Ebook reader for both iOS and Android? | Lparsons21 | Reading and Management | 8 | 01-10-2019 09:50 PM |
[Android] Can any app directly read the Calibre database? | SoulkeepHL | Devices | 2 | 01-10-2013 08:21 PM |
[Android App] Best Android reader software for use with Calibre / Calibre Companion | ellett | Devices | 11 | 12-16-2012 04:27 PM |