downloader

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FT_HTML          = Filetype("html")
	FT_TXT           = Filetype("txt")
	FT_EPUB          = FT_EPUB_IMG
	FT_EPUB_IMG      = Filetype("epub.images")
	FT_EPUB_NO_IMG   = Filetype("epub.noimages")
	FT_KINDLE        = FT_KINDLE_IMG
	FT_KINDLE_IMG    = Filetype("kindle.images")
	FT_KINDLE_NO_IMG = Filetype("kindle.noimages")
	FT_MP3           = Filetype("mp3")

	BASE_URL     = "https://www.gutenberg.org"
	BASE_PATH    = BASE_ROBOT + BASE_HARVEST
	BASE_ROBOT   = "/robot"
	BASE_HARVEST = "/harvest"
	CATALOG_PATH = "/cache/epub/feeds"
	CATALOG_FILE = "/pg_catalog.csv.gz"
)

Variables

This section is empty.

Functions

func DownloadCatalog

func DownloadCatalog() (string, error)

DownloadCatalog will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.

func DownloadFile

func DownloadFile(path string, uurl string) error

DownloadFile will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.

func GetBooksLinks(filetypes []string, languages []string, responseCh chan<- string) error

Types

type Book

type Book string

type Filetype

type Filetype string

Jump to

Keyboard shortcuts

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