futurepress / epub.js

Enhanced eBooks in the browser.
http://futurepress.org
Other
6.5k stars 1.11k forks source link

Does epub.js support .mobi? #1151

Open ChiuMungZitAlexander opened 4 years ago

ChiuMungZitAlexander commented 4 years ago

Dear contributors,

I just tried epub.js to open local .epub files, excellent!

But while I was trying to open local .mobi files, it failed with this error: epub.js:15912 GET http://localhost:3000/null/3000/META-INF/container.xml 404 (Not Found)

So does this happen because epub.js is not supporting .mobi?

johnfactotum commented 4 years ago

It does not support .mobi files. You need to convert them to EPUBs first.

mcthulhu commented 3 years ago

In Jorkens, I check the file extension, and for anything not an epub. I call Calibre's command-line ebook conversion tool in a child process, and then open the resulting epub. It seems to work pretty smoothly. See the convertToEpub function in main.js at https://github.com/mcthulhu/jorkens. This does require that the user have Calibre installed, but you might be able to just include that one executable in your project.