seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

Book compiled with Pandoc isn't readable through COPS in the web browser #411

Closed BNolet closed 6 years ago

BNolet commented 6 years ago

I've compiled an epub with the pandoc utility and upon opening the book with the COPS ebook reader, the front cover shows up, but the arrow navigation doesn't work and when clicking to flip past the cover page, the reader seems to freeze up and I can't navigate back to the original cover page.

The following screenshot is the directory structure of the epub: image

I'm happy to post further screenshots of any files within the epub if needed.

BNolet commented 6 years ago

Decided to dig into the web dev tools in FF and it turns out that the XML parser has a problem with
tags that don't include a /

I'm using HTML in my markdown document to create newlines without space between the lines, so break tags were in many places.

Now there's a problem with the distance between an opening and closing p tag (more than 4000 characters in between)

I can get around having to use br's everywhere by decreasing the padding between p sections, which I guess is more desirable in the end, resulting in a cleaner markdown file :man_shrugging:

However, I'd like to see what can be done to fix this from happening in the future. See below for a screenshot of the error I got relating to the p tag:

image

seblucas commented 6 years ago

Please don't use the embedded Epub viewer, it was fun to code but it's a nightmare to maintain. I'll certainly remove it soon. If I have enough time I'll replace it with Readium epub reader.

BNolet commented 6 years ago

Oh...okay XD Is there anything I can do to help with that?