core

package
v1.5.5-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadBookmark

func DownloadBookmark(url string) (io.ReadCloser, string, error)

DownloadBookmark downloads bookmarked page from specified URL. Return response body, make sure to close it later.

func GenerateEbook added in v1.5.5

func GenerateEbook(req ProcessRequest) (book model.Bookmark, err error)

func GetImages added in v1.5.5

func GetImages(html string) (map[string]string, error)

function get html and return list of image url inside html file

func ProcessBookmark

func ProcessBookmark(req ProcessRequest) (book model.Bookmark, isFatalErr bool, err error)

ProcessBookmark process the bookmark and archive it if needed. Return three values, is error fatal, and error value.

func RemoveUTMParams

func RemoveUTMParams(url string) (string, error)

RemoveUTMParams removes the UTM parameters from URL.

Types

type ProcessRequest

type ProcessRequest struct {
	DataDir     string
	Bookmark    model.Bookmark
	Content     io.Reader
	ContentType string
	KeepTitle   bool
	KeepExcerpt bool
	LogArchival bool
}

ProcessRequest is the request for processing bookmark.

Jump to

Keyboard shortcuts

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