Documentation ¶
Overview ¶
Package fb2 contains entities for fb2-files parsing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct {
HTML string `xml:",innerxml"`
}
Annotation struct of fb2 annotation. http://www.fictionbook.org/index.php/Элемент_annotation
func NewAnnotation ¶
func NewAnnotation(tokenName string, reader xmlparse.TokenReader) (res Annotation, err error)
NewAnnotation factory for Annotation.
type Author ¶
type Author 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"` ID []string `xml:"id"` }
Author struct of fb2 author. http://www.fictionbook.org/index.php/Элемент_author
type Binary ¶
type Binary struct { ContentType string `xml:"content-type,attr"` ID string `xml:"id,attr"` Data string `xml:",innerxml"` }
Binary struct of fb2 binary data. http://www.fictionbook.org/index.php/Элемент_binary
func NewBinary ¶
func NewBinary(token xml.StartElement, reader xmlparse.TokenReader) (res Binary, err error)
NewBinary factory for Binary.
type Body ¶
type Body struct {
HTML string `xml:",innerxml"`
}
Body struct of fb2 body. http://www.fictionbook.org/index.php/Элемент_body
type Cover ¶
type Cover struct {
Images []Image `xml:"image"`
}
Cover struct of fb2 cover page. http://www.fictionbook.org/index.php/Элемент_coverpage
type CustomInfo ¶
CustomInfo struct of fb2 custom info. http://www.fictionbook.org/index.php/Элемент_custom-info
func NewCustomInfo ¶
func NewCustomInfo(token xml.StartElement, reader xmlparse.TokenReader) (res CustomInfo, err error)
NewCustomInfo factory for CustomInfo.
type Description ¶
type Description struct { TitleInfo []TitleInfo `xml:"title-info"` SrcTitleInfo []TitleInfo `xml:"src-title-info"` DocInfo []DocInfo `xml:"document-info"` PublishInfo []Publisher `xml:"publish-info"` CustomInfo []CustomInfo `xml:"custom-info"` }
Description struct of fb2 description. http://www.fictionbook.org/index.php/Элемент_description
func NewDescription ¶
func NewDescription( tokenName string, reader xmlparse.TokenReader, rules []xmlparse.Rule, ) (res Description, err error)
NewDescription factory for Description.
type DocInfo ¶
type DocInfo struct { Authors []Author `xml:"author"` SrcURL []string `xml:"src-url"` ID []string `xml:"id"` Version []string `xml:"version"` Publishers []Author `xml:"publisher"` }
DocInfo struct of fb2 document info. http://www.fictionbook.org/index.php/Элемент_document-info
func NewDocInfo ¶
func NewDocInfo( tokenName string, reader xmlparse.TokenReader, rules []xmlparse.Rule, ) (res DocInfo, err error)
NewDocInfo factory for NewDocInfo.
type File ¶
type File struct { Description []Description `xml:"description"` // Body []Body `xml:"body"` Binary []Binary `xml:"binary"` }
File struct of fb2 file. http://www.fictionbook.org/index.php/Элемент_FictionBook http://www.fictionbook.org/index.php/Описание_формата__от_Sclex
type Image ¶
type Image struct { Type string `xml:"type,attr"` Href string `xml:"href,attr"` Alt string `xml:"alt,attr"` Title string `xml:"title,attr"` ID string `xml:"id,attr"` }
Image struct of fb2 image. http://www.fictionbook.org/index.php/Элемент_image
type Publisher ¶
type Publisher struct { BookAuthor []string `xml:"book-author"` BookName []string `xml:"book-name"` Publisher []string `xml:"publisher"` City []string `xml:"city"` Year []string `xml:"year"` ISBN []string `xml:"isbn"` Sequence []Sequence `xml:"sequence"` }
Publisher struct of fb2 publisher info. http://www.fictionbook.org/index.php/Элемент_publish-info
func NewPublisher ¶
func NewPublisher( tokenName string, reader xmlparse.TokenReader, rules []xmlparse.Rule, ) (res Publisher, err error)
NewPublisher factory for Publisher.
type Sequence ¶
Sequence struct of fb2 sequence info. http://www.fictionbook.org/index.php/Элемент_sequence
func NewSequence ¶
func NewSequence(token xml.StartElement) (res Sequence, err error)
NewSequence factory for Sequence.
type TitleInfo ¶
type TitleInfo struct { Genre []string `xml:"genre"` Author []Author `xml:"author"` BookTitle []string `xml:"book-title"` Annotation []Annotation `xml:"annotation"` Keywords []string `xml:"keywords"` Date []string `xml:"date"` Coverpage []Cover `xml:"coverpage"` Lang []string `xml:"lang"` SrcLang []string `xml:"src-lang"` Translator []Author `xml:"translator"` Sequence []Sequence `xml:"sequence"` }
TitleInfo struct of fb2 title info. http://www.fictionbook.org/index.php/Элемент_title-info
func NewTitleInfo ¶
func NewTitleInfo( tokenName string, reader xmlparse.TokenReader, rules []xmlparse.Rule, ) (res TitleInfo, err error)
NewTitleInfo factory for TitleInfo.