mirror of
https://codeberg.org/scip/epuppy.git
synced 2025-12-16 12:01:00 +01:00
- Use antchfx/xmlquery for easier XML parsing. No more regexp wrangling and the result is much more reliable over a variety of ebooks. Much good. - fix chapter selection, look for `<?xml[...]` which is much more reliable - add option `-x` to dump the XML ebook source for debugging
18 lines
373 B
Go
18 lines
373 B
Go
package epub
|
|
|
|
// Ncx OPS/toc.ncx
|
|
type Ncx struct {
|
|
Points []*NavPoint `xml:"navMap>navPoint" json:"points"`
|
|
}
|
|
|
|
// NavPoint nav point
|
|
type NavPoint struct {
|
|
Text string `xml:"navLabel>text" json:"text"`
|
|
Content Content `xml:"content" json:"content"`
|
|
Points []NavPoint `xml:"navPoint" json:"points"`
|
|
}
|
|
|
|
type Title struct {
|
|
Content string `xml:"head>title"`
|
|
}
|