Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chapter ¶
type Chapter struct { ChapterNumber int `json:"chapterNumber"` ChapterName string `json:"chapterName"` Images []string `json:"images"` Content []PageObject `json:"content"` URL string `json:"url"` }
Chapter represents a Chapter in a book.
type Metadata ¶
type Metadata struct { Website ScrapingWebsite `json:"website" yaml:"Website"` Title string `json:"title" yaml:"Title"` Author string `json:"author" yaml:"Author"` Language string `json:"language" yaml:"Language"` Year string `json:"year" yaml:"Year"` Cover string `json:"cover" yaml:"CoverImageURL"` ChapterURLs []string `json:"chapterURLs" yaml:"ChapterURLs"` Format Exporters `json:"exportFormat" yaml:"ExportFormat"` }
Metadata stores metadata for books
type PageImage ¶
type PageImage struct { ID uint `json:"id"` Image string `json:"image"` Width int `json:"width"` Height int `json:"height"` }
PageImage is used to store an image on a page
func NewPageImage ¶
NewPageImage creates a new page
type PageObject ¶
type PageObject interface {
GetID() uint
}
PageObject is an arbitary object on a page
type Paragraph ¶
Paragraph represents a Paragraph in a chapter
func NewParagraph ¶
NewParagraph creates a new paragraph
type ScrapingWebsite ¶
type ScrapingWebsite string
ScrapingWebsite declares supported scraping websites
const ( //CRIMSON scrapes from crimsonmagic CRIMSON ScrapingWebsite = "crimsonmagic" //WUXIA scrapes from wuxia WUXIA ScrapingWebsite = "wuxia" //FULLBOOKEDTLS for fullbookedtls FULLBOOKEDTLS ScrapingWebsite = "fullybookedtls" )
Click to show internal directories.
Click to hide internal directories.