Fix more parser failures (#10)

* stabilize section parsing, now seems to read all ebooks I tested with
* refactored Open() into smaller funcs
* bump version
This commit is contained in:
T.v.Dein
2025-10-20 18:54:49 +00:00
committed by GitHub
parent cb671b7401
commit f524083210
4 changed files with 144 additions and 41 deletions

View File

@@ -9,6 +9,11 @@ import (
"path"
)
// a section in the book
type Section struct {
File, Title, MediaType string
}
// Book epub book
type Book struct {
Ncx Ncx `json:"ncx"`
@@ -20,6 +25,8 @@ type Book struct {
CoverImage []byte
CoverFile string
CoverMediaType string
Sections []Section
dumpxml bool
}
// Open open resource file