Documentation
¶
Overview ¶
Package fb2 represent .fb2 format parser
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthorType ¶
type AuthorType struct {
FirstName string `xml:"first-name"`
MiddleName string `xml:"middle-name"`
LastName string `xml:"last-name"`
Nickname string `xml:"nickname"`
HomePage string `xml:"home-page"`
Email string `xml:"email"`
}
AuthorType embedded fb2 type, represents author info
type FB2 ¶
type FB2 struct {
ID string `bson:"_id"`
FictionBook xml.Name `xml:"FictionBook" bson:"FictionBook"`
Stylesheet []string `xml:"stylesheet" bson:"stylesheet"`
Description struct {
TitleInfo struct {
Genre []string `xml:"genre" bson:"genre"`
GenreType []string `xml:"genreType" bson:"genreType"`
Author []AuthorType `xml:"author" bson:"author"`
BookTitle string `xml:"book-title" bson:"book-title"`
Annotation string `xml:"annotation" bson:"annotation"`
Keywords string `xml:"keywords" bson:"keywords"`
Date string `xml:"date" bson:"date"`
Coverpage struct {
Image struct {
Href string `xml:"xlink:href,attr" bson:"href"`
} `xml:"image,allowempty" bson:"image"`
} `xml:"coverpage" bson:"coverpage"`
Lang string `xml:"lang" bson:"lang"`
SrcLang string `xml:"src-lang" bson:"src-lang"`
Translator AuthorType `xml:"translator" bson:"translator"`
Sequence string `xml:"sequence" bson:"sequence"`
} `xml:"title-info" bson:"title-info"`
DocumentInfo struct {
Author []AuthorType `xml:"author" bson:"author"`
ProgramUsed string `xml:"program-used" bson:"program-used"`
Date string `xml:"date" bson:"date"`
SrcURL []string `xml:"src-url" bson:"src-url"`
SrcOcr string `xml:"src-ocr" bson:"src-ocr"`
ID string `xml:"id" bson:"id"`
Version float64 `xml:"version" bson:"version"`
History string `xml:"history" bson:"history"`
} `xml:"document-info" bson:"document-info"`
PublishInfo struct {
BookName string `xml:"book-name" bson:"book-name"`
Publisher string `xml:"publisher" bson:"publisher"`
City string `xml:"city" bson:"city"`
Year int `xml:"year" bson:"year"`
ISBN string `xml:"isbn" bson:"isbn"`
Sequence string `xml:"sequence" bson:"sequence"`
} `xml:"PublishInfo" bson:"PublishInfo"`
CustomInfo []struct {
InfoType string `xml:"info-type" bson:"info-type"`
} `xml:"custom-info" bson:"custom-info"`
} `xml:"description" bson:"description"`
Body struct {
Sections []struct {
P []string `xml:"p" bson:"p"`
} `xml:"section" bson:"section"`
} `xml:"body" bson:"body"`
Binary []struct {
Value string `xml:",chardata" bson:"value"`
ContentType string `xml:"content-type,attr" bson:"content-type"`
ID string `xml:"id,attr" bson:"id"`
} `xml:"binary" bson:"binary"`
}
FB2 represents FB2 structure
func (*FB2) UnmarshalCoverpage ¶
UnmarshalCoverpage func
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser struct
func (*Parser) CharsetReader ¶
CharsetReader required for change encodings
type TextFieldType ¶
type TextFieldType struct {
}
TextFieldType embedded fb2 type, represents text field
Click to show internal directories.
Click to hide internal directories.