Documentation ¶
Index ¶
- func AskForISBN() (string, error)
- func CleanCategory(category string) (string, error)
- func CleanDescription(desc string) string
- func CleanLanguage(language string) string
- func CleanType(typ string) (string, error)
- type Author
- type ISBN
- type ISBNs
- type Metadata
- type Series
- type SingleSeries
- type Tag
- type Tags
- func (t *Tags) Add(tags ...Tag) (added bool)
- func (t *Tags) AddFromNames(tags ...string) bool
- func (t *Tags) Clean()
- func (t *Tags) Has(o Tag) (isIn bool, index int)
- func (t *Tags) HasAny() bool
- func (t *Tags) Remove(tags ...Tag) (removed bool)
- func (t *Tags) RemoveFromNames(tags ...string) bool
- func (t *Tags) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForISBN ¶ added in v0.9.0
AskForISBN when not found in epub
func CleanCategory ¶ added in v0.9.0
func CleanDescription ¶ added in v0.9.0
func CleanLanguage ¶ added in v0.9.0
Types ¶
type Metadata ¶
type Metadata struct { BookTitle string `json:"title" xml:"title"` ImageURL string `json:"image_url" xml:"image_url"` NumPages string `json:"num_pages" xml:"num_pages"` Authors []Author `json:"authors" xml:"authors>author"` ISBN string `json:"isbn" xml:"isbn13"` Format string `json:"format" xml:"format"` OriginalYear string `json:"year" xml:"work>original_publication_year"` EditionYear string `json:"edition_year" xml:"publication_year"` EditionInfo string `json:"edition_information" xml:"edition_information"` Description string `json:"description" xml:"description"` Series Series `json:"series" xml:"series_works>series_work"` AverageRating string `json:"average_rating" xml:"average_rating"` Tags Tags `json:"tags" xml:"popular_shelves>shelf"` Category string `json:"category"` Type string `json:"type"` Genre string `json:"genre"` Language string `json:"language" xml:"language_code"` Publisher string `json:"publisher" xml:"publisher"` }
Metadata contains all of the known book metadata.
func (*Metadata) MainSeries ¶ added in v0.10.0
func (i *Metadata) MainSeries() SingleSeries
MainSeries return the main Series of Metadata.
type Series ¶
type Series []SingleSeries
Series can track a series and the position of an epub.
func (*Series) AddFromString ¶ added in v0.9.0
AddFromString a series, checking for correct form.
type SingleSeries ¶
type SingleSeries struct { Name string `json:"name" xml:"series>title"` Position string `json:"index" xml:"user_position"` }
SingleSeries holds the name and index of a series a Book is part of.
func (SingleSeries) String ¶ added in v0.9.0
func (s SingleSeries) String() string
String outputs a single series info.
type Tag ¶
type Tag struct {
Name string `json:"name" xml:"name,attr"`
}
Tag holds the name of a tag.
type Tags ¶
type Tags []Tag
Tags can track a book's Tags
func (*Tags) AddFromNames ¶ added in v0.9.0
AddFromNames Tags to the list, from []string
func (*Tags) RemoveFromNames ¶ added in v0.9.0
RemoveFromNames Tags to the list, from []string
Click to show internal directories.
Click to hide internal directories.