Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epub output parsing errors #688

Closed
blogbourri opened this issue Jul 31, 2023 · 3 comments · Fixed by #679
Closed

epub output parsing errors #688

blogbourri opened this issue Jul 31, 2023 · 3 comments · Fixed by #679
Assignees
Labels
feature:ebooks type:bug Something isn't working
Milestone

Comments

@blogbourri
Copy link

Data

  • Shiori version: ghcr.io/go-shiori/shiori:latest
  • Database Engine: mysql
  • Operating system: synology
  • CLI/Web interface/Web Extension: web interface

Describe the bug / actual behavior

Epub files currently output are malformed. This caused the following error on calibre-web, which was resolved when I removed the malformed epubs from my library:

janeczku/calibre-web#2834

Note from the error message:

lxml.etree.XMLSyntaxError: Namespace prefix dc on title is not defined, line 4, column 14

Checking the epubs with epubcheck returns three errors:

ERROR(RSC-005): ./books/Bo/databases/eBookIt/temp_uploads/1690815957.epub/OEBPS/content.opf(-1,-1): Error while parsing file: The prefix "dc" for element "dc:title" is not bound.

ERROR(OPF-001): ./books/Bo/databases/eBookIt/temp_uploads/1690815957.epub/OEBPS/content.opf(-1,-1): There was an error when parsing the EPUB version: Version not found.

ERROR(PKG-007): ./books/Bo/databases/eBookIt/temp_uploads/1690815957.epub/mimetype(-1,-1): Mimetype file should only contain the string "application/epub+zip" and should not be compressed.

Therefore, it seems to be the title element specifically that is causing the issue here, but there shouldn't be the other errors either.

Expected behavior

Epubs should be valid against W3C standards and compatible with standard epub software.

To Reproduce

Steps to reproduce the behavior:

  1. Validate epub from shiori here or with epubcheck: https://www.ebookit.com/tools/bp/Bo/eBookIt/epub-validator
@blogbourri blogbourri added the type:bug Something isn't working label Jul 31, 2023
@github-project-automation github-project-automation bot moved this to To do in Roadmap Jul 31, 2023
@fmartingr
Copy link
Member

Thanks for raising awareness of this. Ebooks is a very recent feature and we are currently working on it.

Leaving this here as well, which would make easy to make tests for this:

https://www.w3.org/publishing/epubcheck/

@Monirzadeh
Copy link
Collaborator

@blogbourri Thanks for report, we work on this can you please give me a link example?
Or confirm if this file work fine in your device? (image too)
book.zip

@fmartingr fmartingr added this to the 1.6.0 milestone Aug 5, 2023
@blogbourri
Copy link
Author

@blogbourri Thanks for report, we work on this can you please give me a link example? Or confirm if this file work fine in your device? (image too) book.zip

just tested your epub and yes it does work :)

if you still want an example that breaks it, you can try this one:

https://bookmark.colorbash.art/bookmark/25/content

@fmartingr fmartingr moved this from To do to In progress in Roadmap Aug 6, 2023
@fmartingr fmartingr moved this from In progress to Ready in Roadmap Aug 20, 2023
@github-project-automation github-project-automation bot moved this from Ready to Done in Roadmap Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:ebooks type:bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants