book

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToEpub

func AppendToEpub(e *epub.Epub, c chapter)

func Filename

func Filename(name string) string
func GetLinks(url *urllib.URL, selector string, limit, offset int, reverse, include bool) ([]link, string, chapter, error)

func GetPath

func GetPath(elm *goquery.Selection) string

func NewChapter

func NewChapter(body, name, author, content string, subChapters []chapter, config *ScrapeConfig) chapter

func NewChapterFromURL

func NewChapterFromURL(url, linkName string, configs []*ScrapeConfig, index int, updateProgressBarName func(index int, name string)) chapter

func NewEmptyChapter

func NewEmptyChapter() chapter
func NewLink(href, text string, date *time.Time) link

func NewProgress

func NewProgress(links []link, parent string, depth int) progress

func ToEpub

func ToEpub(c chapter, filename string) string

func ToHtml

func ToHtml(c chapter, filename string) string

func ToHtmlString

func ToHtmlString(c chapter) string

func ToMarkdown

func ToMarkdown(c chapter, filename string) string

func ToMarkdownString

func ToMarkdownString(c chapter) string

func ToMobi

func ToMobi(c chapter, filename string) string

Types

type ScrapeConfig

type ScrapeConfig struct {
	Depth       int
	Selector    string
	Quiet       bool
	Limit       int
	Offset      int
	Reverse     bool
	Delay       int
	Threads     int
	Include     bool
	ImagesOnly  bool
	UseLinkName bool
}

func NewScrapeConfig

func NewScrapeConfig() *ScrapeConfig

func NewScrapeConfigFake

func NewScrapeConfigFake() *ScrapeConfig

func NewScrapeConfigNoInclude

func NewScrapeConfigNoInclude() *ScrapeConfig

func NewScrapeConfigs

func NewScrapeConfigs(selectors []string) []*ScrapeConfig

func NewScrapeConfigsAjin

func NewScrapeConfigsAjin() []*ScrapeConfig

func NewScrapeConfigsWikipedia

func NewScrapeConfigsWikipedia() []*ScrapeConfig

Jump to

Keyboard shortcuts

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