fb2

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollapseSpaces added in v1.1.1

func CollapseSpaces(s string) string

Types

type Annotation

type Annotation struct {
	Text string `xml:",innerxml"`
}

type Author

type Author struct {
	FirstName  string `xml:"first-name"`
	MiddleName string `xml:"middle-name"`
	LastName   string `xml:"last-name"`
}

type Binary

type Binary struct {
	Id          string `xml:"id,attr"`
	ContentType string `xml:"content-type,attr"`
	Content     []byte `xml:",chardata"`
}

func GetCoverPageBinary

func GetCoverPageBinary(coverLink string, rc io.ReadCloser) (*Binary, error)

func (*Binary) String

func (b *Binary) String() string

type CoverPage

type CoverPage struct {
	*Image `xml:"image"`
}

type FB2

type FB2 struct {
	*TitleInfo
}

func NewFB2

func NewFB2(rc io.ReadCloser) (*FB2, error)

func (*FB2) GetAuthors

func (fb *FB2) GetAuthors() []*model.Author

func (*FB2) GetCover

func (fb *FB2) GetCover() string

func (*FB2) GetFormat

func (fb *FB2) GetFormat() string

func (*FB2) GetGenres

func (fb *FB2) GetGenres() []string

func (*FB2) GetLanguage

func (fb *FB2) GetLanguage() *model.Language

func (*FB2) GetPlot

func (fb *FB2) GetPlot() string

func (*FB2) GetSerie

func (fb *FB2) GetSerie() *model.Serie

func (*FB2) GetSerieNumber

func (fb *FB2) GetSerieNumber() int

func (*FB2) GetSort

func (fb *FB2) GetSort() string

func (*FB2) GetTitle

func (fb *FB2) GetTitle() string

func (*FB2) GetYear

func (fb *FB2) GetYear() string

func (*FB2) String

func (fb *FB2) String() string

type Image

type Image struct {
	Href string `xml:"http://www.w3.org/1999/xlink href,attr"`
}

type Serie

type Serie struct {
	Name   string `xml:"name,attr"`
	Number int    `xml:"number,attr"`
}

type TitleInfo

type TitleInfo struct {
	Authors    []Author   `xml:"author"`
	Title      string     `xml:"book-title"`
	Gengres    []string   `xml:"genre"`
	Annotation Annotation `xml:"annotation"`
	Date       string     `xml:"date"`
	Year       string     `xml:"year"`
	Lang       string     `xml:"lang"`
	Serie      Serie      `xml:"sequence"`
	CoverPage  Image      `xml:"coverpage>image"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL