reduxer

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package reduxer implements a set of functions to transform webpage to various formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(ctx context.Context, urls ...string) (shots []screenshot.Screenshots, err error)

Capture returns screenshot.Screenshots of given URLs

Types

type Asset added in v0.15.1

type Asset struct {
	Local  string
	Remote Remote
}

Asset represents the files on the local disk and the remote servers.

type Assets added in v0.15.1

type Assets struct {
	Img, PDF, Raw, Txt, HAR, WARC, Media Asset
}

Assets represents the file paths stored on the local disk.

type Bundle

type Bundle struct {
	screenshot.Screenshots

	Assets  Assets
	Article readability.Article
}

Bundle represents a bundle data of a webpage.

func (*Bundle) Asset added in v0.15.1

func (b *Bundle) Asset() (paths []Asset)

Asset returns paths of asset on the local disk.

type Bundles added in v0.14.0

type Bundles map[string]*Bundle

Bundles represents a set of the Bundle in a map, and its key is a URL string.

func Do

func Do(ctx context.Context, urls ...string) (bundles Bundles, err error)

Do executes secreenshot, print PDF and export html of given URLs Returns a set of bundle containing screenshot data and file path nolint:gocyclo

type Remote added in v0.15.1

type Remote struct {
	Anonfile string
	Catbox   string
}

Remote represents the file on the remote server.

Jump to

Keyboard shortcuts

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