lib

package
v0.0.0-...-290a309 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImage

func GetImage(node *html.Node) (name, url string)
func GetLink(node *html.Node) (name, link string)

func IsValidImageUrl

func IsValidImageUrl(url string) bool

func NewWriter

func NewWriter() *writer

func RemoveUnnecessaryTokens

func RemoveUnnecessaryTokens(c string) string

Types

type Saver

type Saver struct {
	ID int
	// contains filtered or unexported fields
}

func NewSaver

func NewSaver(id int) *Saver

func (*Saver) AddImageUrl

func (s *Saver) AddImageUrl(imageUrl ...string)

func (*Saver) GetImageDir

func (s *Saver) GetImageDir() string

func (*Saver) GetImagePath

func (s *Saver) GetImagePath(postId, imageUrl string) string

func (*Saver) GetPostDir

func (s *Saver) GetPostDir() string

func (*Saver) SaveImage

func (s *Saver) SaveImage(postId, url string) error

func (*Saver) SavePost

func (s *Saver) SavePost(postId, year, month, day, title, contnet string) error

Jump to

Keyboard shortcuts

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