mangadex

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCRAPERNAME            = "Mangadex"
	APIROOT                = "https://api.mangadex.org"
	CHAPTERSPERMIN         = 40 // set from API docs
	ENFORCECHAPTERDURATION = true
	REGISTRABLE            = true
)

Variables

This section is empty.

Functions

func SetConfig added in v1.1.1

func SetConfig(cfg Config)

Types

type Config

type Config struct {
	// Scraper
	FilenameTemplate string   `yaml:"filenameTemplate"`
	RatingFilter     []string `yaml:"ratingFilter"`
	LanguageFilter   []string `yaml:"languageFilter"`
	DataSaver        bool     `yaml:"dataSaver"`

	// Connection
	SyncDeletions bool `yaml:"syncDeletions"`
}

func (*Config) Default

func (c *Config) Default()

type Connection

type Connection struct {
}

func NewConnection

func NewConnection() *Connection

func (*Connection) GetConnectionName

func (c *Connection) GetConnectionName() string

type Scraper

type Scraper struct {
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper() *Scraper

func (*Scraper) ChapterTitles

func (m *Scraper) ChapterTitles() ([]string, *logging.ScraperError)

ChapterTitles Returns the full titles of chapters

func (*Scraper) Chapters

func (m *Scraper) Chapters() ([]manga.Chapter, *logging.ScraperError)

func (*Scraper) Download

func (m *Scraper) Download(dl *downloader.Downloader, directoryMapping, downloadType string) []manga.Chapter

Download selected chapters. Handles errors itself. Returns array of chapters that succeeded

func (*Scraper) EnforceChapterDuration

func (m *Scraper) EnforceChapterDuration() bool

func (*Scraper) FilterGroups

func (m *Scraper) FilterGroups(groups []string) *logging.ScraperError

func (*Scraper) GroupNames

func (m *Scraper) GroupNames() ([]string, *logging.ScraperError)

func (*Scraper) MangaID

func (m *Scraper) MangaID() string

func (*Scraper) MangaTitle

func (m *Scraper) MangaTitle() string

func (*Scraper) Registrable added in v1.0.2

func (m *Scraper) Registrable() bool

func (*Scraper) ScraperName

func (m *Scraper) ScraperName() string

func (*Scraper) Search

func (m *Scraper) Search(query string) ([]string, *logging.ScraperError)

Search for a Manga, will fill searchResults with 0 or more results

func (*Scraper) SearchByID

func (m *Scraper) SearchByID(id, title string) *logging.ScraperError

SearchByID for a Manga, will fill searchResults with ONLY 1 result (first result)

func (*Scraper) SelectChapters

func (m *Scraper) SelectChapters(titles []string) *logging.ScraperError

func (*Scraper) SelectManga

func (m *Scraper) SelectManga(name string) *logging.ScraperError

SelectManga from searchResults list

func (*Scraper) SelectNewChapters

func (m *Scraper) SelectNewChapters(chapterIDs []string) ([]manga.Chapter, *logging.ScraperError)

Jump to

Keyboard shortcuts

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