filters

package
v0.0.0-...-54c120a Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PageFilter

type PageFilter interface {
	// Filter would filter the content for page
	Filter(content string) (string, error)
	// IsEnabled whether the filter is enabled or not
	IsEnabled() bool
	// Name of the filter
	Name() string
}

PageFilter main interface for all the filters

func NewCutFilter

func NewCutFilter(page *models.Page) PageFilter

NewCutFilter create a new instance of the cut filter

func NewCutLineFilter

func NewCutLineFilter(page *models.Page) PageFilter

NewCutLineFilter create a new instance of the cut line filter

func NewDayFilter

func NewDayFilter(page *models.Page) PageFilter

NewDayFilter a new instance of the filter that cuts a content based on days

func NewHTMLConverter

func NewHTMLConverter(page *models.Page) PageFilter

NewHTMLConverter a new instance of the filter that uses the html2text converter

func NewHTMLToMdConverter

func NewHTMLToMdConverter(page *models.Page) PageFilter

NewHTMLToMdConverter a new instance of the filter that converts html to markdown

func NewNewLineTrimConverter

func NewNewLineTrimConverter(_ *models.Page) PageFilter

NewNewLineTrimConverter a new instance of the filter that cuts the line of the content

Jump to

Keyboard shortcuts

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