Documentation ¶
Index ¶
- Variables
- func DownloadBookImage(deps *dependencies.Dependencies, url, dstPath string) error
- func DownloadBookmark(url string) (io.ReadCloser, string, error)
- func GenerateEbook(deps *dependencies.Dependencies, req ProcessRequest, dstPath string) (book model.BookmarkDTO, err error)
- func ProcessBookmark(deps *dependencies.Dependencies, req ProcessRequest) (book model.BookmarkDTO, isFatalErr bool, err error)
- func RemoveUTMParams(url string) (string, error)
- type ProcessRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSupportedImageType = errors.New("unsupported image type")
Functions ¶
func DownloadBookImage ¶ added in v1.6.0
func DownloadBookImage(deps *dependencies.Dependencies, url, dstPath string) error
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(deps *dependencies.Dependencies, req ProcessRequest, dstPath string) (book model.BookmarkDTO, err error)
GenerateEbook receives a `ProcessRequest` and generates an ebook file in the destination path specified. The destination path `dstPath` should include file name with ".epub" extension The bookmark model will be used to update the UI based on whether this function is successful or not.
func ProcessBookmark ¶
func ProcessBookmark(deps *dependencies.Dependencies, req ProcessRequest) (book model.BookmarkDTO, isFatalErr bool, err error)
ProcessBookmark process the bookmark and archive it if needed. Return three values, is error fatal, and error value.
func RemoveUTMParams ¶
RemoveUTMParams removes the UTM parameters from URL.
Types ¶
Click to show internal directories.
Click to hide internal directories.