Repository navigation
Expand file tree
/
Copy pathptagx.go
More file actions
44 lines (40 loc) · 1.8 KB
/
Copy pathptagx.go
File metadata and controls
44 lines (40 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package mobi
type tagEntry uint8
const (
tagEntryEND tagEntry = 0
tagEntryPos = 1 // NCX | Position offset for the beginning of NCX record (filepos) Ex: Beginning of a chapter
tagEntryLen = 2 // NCX | Record lenght. Ex: Chapter lenght
tagEntryNameOffset = 3 // NCX | Label text offset in CNCX
tagEntryDepthLvl = 4 // NCX | Depth/Level of CNCX
tagEntryKOffs = 5 // NCX | kind CNCX offset
tagEntryPosFid = 6 // NCX | pos:fid
tagEntryParent = 21 // NCX | Parent
tagEntryChild1 = 22 // NCX | First child
tagEntryChildN = 23 // NCX | Last child
tagEntryImageIndex = 69
tagEntryDescOffset = 70 // Description offset in cncx
tagEntryAuthorOffset = 71 // Author offset in cncx
tagEntryImageCaptionOffset = 72 // Image caption offset in cncx
tagEntryImgAttrOffset = 73 // Image attribution offset in cncx
)
var tagEntryMap = map[tagEntry]string{
tagEntryPos: "Offset",
tagEntryLen: "Lenght",
tagEntryNameOffset: "Label",
tagEntryDepthLvl: "Depth",
tagEntryKOffs: "Kind",
tagEntryPosFid: "Pos:Fid",
tagEntryParent: "Parent",
tagEntryChild1: "First Child",
tagEntryChildN: "Last Child",
tagEntryImageIndex: "Image Index",
tagEntryDescOffset: "Description",
tagEntryAuthorOffset: "Author",
tagEntryImageCaptionOffset: "Image Caption Offset",
tagEntryImgAttrOffset: "Image Attr Offset"}
type mobiPTagx struct {
Tag tagEntry
TagValueCount uint8
ValueCount uint32
ValueBytes uint32
}