Documentation
¶
Overview ¶
Package fb2 represent .fb2 format parser
Index ¶
- func NewPFB2() prototype.PFB2
- func ToPB(target FB2) prototype.PFB2
- type AuthorType
- type Binary
- type Body
- type Coverpage
- type CustomInfo
- type Description
- type DocumentInfo
- type FB2
- type Image
- type PType
- type Parser
- type ProtoFB2
- type PublishInfo
- type Sections
- type TextFieldType
- type Title
- type TitleInfo
- type TitleType
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 CustomInfo ¶
type CustomInfo struct {
InfoType string `xml:"info-type" bson:"info-type"`
}
type Description ¶
type Description struct { TitleInfo TitleInfo `xml:"title-info" bson:"title-info"` DocumentInfo DocumentInfo `xml:"document-info" bson:"document-info"` PublishInfo PublishInfo `xml:"PublishInfo" bson:"PublishInfo"` CustomInfo []CustomInfo `xml:"custom-info" bson:"custom-info"` }
type DocumentInfo ¶
type 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"` }
type FB2 ¶
type FB2 struct { ID string `bson:"_id"` FictionBook xml.Name `xml:"FictionBook" bson:"FictionBook"` Stylesheet []string `xml:"stylesheet" bson:"stylesheet"` Description Description `xml:"description" bson:"description"` Body Body `xml:"body" bson:"body"` Binary []Binary `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 PublishInfo ¶
type TextFieldType ¶
type TextFieldType struct { }
TextFieldType embedded fb2 type, represents text field
type TitleInfo ¶
type 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 Coverpage `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"` }
Click to show internal directories.
Click to hide internal directories.