Documentation ¶
Index ¶
- type Chapter
- type Enumerable
- type Filterable
- type Filterables
- type Grabber
- func (g Grabber) BaseUrl() string
- func (g Grabber) GetFilenameTemplate() string
- func (g Grabber) GetMaxConcurrency() MaxConcurrency
- func (g Grabber) GetPreferredLanguage() string
- func (g *Grabber) IdentifySite() (Site, []error)
- func (g *Grabber) InitFlags(cmd *cobra.Command)
- func (g *Grabber) SetMaxConcurrency(m MaxConcurrency)
- type Inmanga
- type InmangaChapter
- type Mangadex
- type MangadexChapter
- type MaxConcurrency
- type Page
- type PlainHTML
- type PlainHTMLChapter
- type Settings
- type Site
- type SiteSelector
- type Tcb
- type TcbChapter
- type Titleable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chapter ¶ added in v0.0.3
type Chapter struct { // Title is the chapter title Title string // Number is the chapter number Number float64 // PagesCount is the number of pages in the chapter PagesCount int64 // Pages is the list of pages in the chapter Pages []Page // Language is the chapter language Language string }
Chapter represents a manga chapter
type Enumerable ¶ added in v0.0.3
type Enumerable interface {
GetNumber() float64
}
Enumerable represents an object that can be enumerated
type Filterable ¶ added in v0.0.3
type Filterable interface { Enumerable Titleable }
Filterable represents an filterable objects
type Filterables ¶ added in v0.0.3
type Filterables []Filterable
Filterables represents a slice of Filterable
func (Filterables) Filter ¶ added in v0.0.3
func (f Filterables) Filter(cond func(Filterable) bool) Filterables
Filter allows to filter Filterables by the given condition
func (Filterables) FilterRanges ¶ added in v0.0.3
func (f Filterables) FilterRanges(rngs []ranges.Range) Filterables
FilterRanges returns the specified ranges of Filterables sorted by their Number
func (Filterables) SortByNumber ¶ added in v0.0.3
func (f Filterables) SortByNumber() Filterables
SortByNumber sorts Filterables by Number
type Grabber ¶ added in v0.0.3
type Grabber struct { // URL is the manga index URL URL string // Settings are the grabber settings Settings *Settings }
Grabber is the base struct for all grabbers/sites
func (Grabber) GetFilenameTemplate ¶ added in v0.0.6
GetFilenameTemplate returns the defined filename template
func (Grabber) GetMaxConcurrency ¶ added in v0.0.5
func (g Grabber) GetMaxConcurrency() MaxConcurrency
GetMaxConcurrency returns the max concurrency for the site
func (Grabber) GetPreferredLanguage ¶ added in v0.0.5
GetPreferredLanguage returns the preferred language for the site
func (*Grabber) IdentifySite ¶ added in v0.0.3
IdentifySite returns the site passing the Test() for the specified url
func (*Grabber) SetMaxConcurrency ¶ added in v0.0.5
func (g *Grabber) SetMaxConcurrency(m MaxConcurrency)
SetMaxConcurrency sets the max concurrency for the site
type Inmanga ¶ added in v0.0.6
type Inmanga struct { *Grabber // contains filtered or unexported fields }
Inmanga is a grabber for inmanga.com
func (Inmanga) FetchChapter ¶ added in v0.0.6
func (i Inmanga) FetchChapter(chap Filterable) (*Chapter, error)
FetchChapter fetches the chapter with its pages
func (Inmanga) FetchChapters ¶ added in v0.0.6
func (i Inmanga) FetchChapters() (Filterables, []error)
FetchChapters returns the chapters of the manga
func (*Inmanga) FetchTitle ¶ added in v0.0.6
GetTitle fetches the manga title
type InmangaChapter ¶ added in v0.0.6
InmangaChapter is a chapter representation from InManga
type Mangadex ¶ added in v0.0.6
type Mangadex struct { *Grabber // contains filtered or unexported fields }
Mangadex is a grabber for mangadex.org
func (Mangadex) FetchChapter ¶ added in v0.0.6
func (m Mangadex) FetchChapter(f Filterable) (*Chapter, error)
FetchChapter fetches a chapter and its pages
func (Mangadex) FetchChapters ¶ added in v0.0.6
func (m Mangadex) FetchChapters() (chapters Filterables, errs []error)
FetchChapters returns the chapters of the manga
func (*Mangadex) FetchTitle ¶ added in v0.0.6
GetTitle returns the title of the manga
type MangadexChapter ¶ added in v0.0.6
MangadexChapter represents a MangaDex Chapter
type MaxConcurrency ¶ added in v0.0.5
type MaxConcurrency struct { // Chapters is the max concurrency for chapters Chapters uint8 // Pages is the max concurrency for pages Pages uint8 }
MaxConcurrency is the max concurrency for a site
type PlainHTML ¶ added in v0.0.11
type PlainHTML struct { *Grabber // contains filtered or unexported fields }
PlainHTML is a grabber for any plain HTML page (with no ajax pagination whatsoever)
func (PlainHTML) FetchChapter ¶ added in v0.0.11
func (m PlainHTML) FetchChapter(f Filterable) (*Chapter, error)
FetchChapter fetches a chapter and its pages
func (PlainHTML) FetchChapters ¶ added in v0.0.11
func (m PlainHTML) FetchChapters() (chapters Filterables, errs []error)
FetchChapters returns a slice of chapters
func (PlainHTML) FetchTitle ¶ added in v0.0.11
Ttitle returns the manga title
type PlainHTMLChapter ¶ added in v0.0.11
PlainHTMLChapter represents a PlainHTML Chapter
type Settings ¶ added in v0.0.7
type Settings struct { // Bundle is a flag to indicate if the chapters should be bundled into a single file Bundle bool // MaxConcurrency determines max download concurrency MaxConcurrency MaxConcurrency // Language is the preferred language for downloading chapters Language string // FilenameTemplate is the template for the filename FilenameTemplate string // Range is the range to be downloaded (in string, i.e. "1-10,23,45-50") Range string // OutputDir is the output directory for the downloaded files OutputDir string }
Settings are grabber settings
type Site ¶ added in v0.0.3
type Site interface { // InitFlags initializes the command flags InitFlags(cmd *cobra.Command) // Test tests if the site is the one for the specified url Test() (bool, error) // FetchChapters fetches the chapters for the manga FetchChapters() (Filterables, []error) // FetchChapter fetches the specified chapter FetchChapter(Filterable) (*Chapter, error) // FetchTitle fetches the manga title FetchTitle() (string, error) // BaseUrl returns the base url of the site BaseUrl() string // GetFilenameTemplate returns the filename template GetFilenameTemplate() string // GetMaxConcurrency returns the max concurrency for the site GetMaxConcurrency() MaxConcurrency // GetPreferredLanguage returns the preferred language for the site GetPreferredLanguage() string }
Site is the handler interface, base of all manga sites grabbers
type SiteSelector ¶ added in v0.0.11
type Tcb ¶ added in v0.0.4
type Tcb struct { *Grabber // contains filtered or unexported fields }
Tcb is a grabber for tcbscans.com (and possibly other wordpress sites)
func (Tcb) FetchChapter ¶ added in v0.0.4
func (t Tcb) FetchChapter(f Filterable) (*Chapter, error)
FetchChapter fetches a chapter and its pages
func (Tcb) FetchChapters ¶ added in v0.0.4
func (t Tcb) FetchChapters() (chapters Filterables, errs []error)
FetchChapters returns a slice of chapters
func (*Tcb) FetchTitle ¶ added in v0.0.6
GetTitle fetches and returns the manga title
type TcbChapter ¶ added in v0.0.4
TcbChapter is a chapter for TCBScans