2.0.0 (2024-12-03)
Bug Fixes
- deps: bump dependency go from 1.23.3 to 1.23.4 (#12) (933adfe)
Features
- epub version 2 can also be parsed now (#11) (33d99fb)
BREAKING CHANGES
- the return model change. This is now an unified Model so that is possible to parse different epub versions. However if the old behaviour is wanted than just use:
book := &model.Book{ZipReader: reader}
err := book.ReadXML("META-INF/container.xml", &book.Container)
if err != nil {
return nil, err
}
header := model.Package{}
err = book.ReadXML(book.Container.Rootfile.Path, &header)
if err != nil {
return nil, err
}
opf := epub_v3.Package{}
err := book.ReadXML(book.Container.Rootfile.Path, &opf)