util

package
v0.0.0-...-f96d543 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCover

func AddCover(epub *epub.Epub, filePath string) (string, error)

func AddImage

func AddImage(epub *epub.Epub, filePath string) (string, error)

func AddImageToXhtml

func AddImageToXhtml(internalPath string, xhtml string) string

func AddSection

func AddSection(epub *epub.Epub, title string, article string) error

func AddSectionXhtml

func AddSectionXhtml(epub *epub.Epub, title string, xhtml string) error

func CheckDir

func CheckDir(dirPath string) error

func CheckFileExist

func CheckFileExist(filePath string) bool

func ConvertToString

func ConvertToString(src string, srcCode string, tagCode string) string

func ConvertToUtf8

func ConvertToUtf8(str string) string

func CreateSectionXhtml

func CreateSectionXhtml(title string, article string) string

func GbkToUtf8

func GbkToUtf8(s []byte) ([]byte, error)

func GetUrlLastString

func GetUrlLastString(s string) string

func Utf8ToGbk

func Utf8ToGbk(s string) ([]byte, error)

Types

type ProgressWriter

type ProgressWriter struct {
	Writer       io.Writer
	ProgressBar  *pb.ProgressBar
	CurrentBytes int64
}

func (*ProgressWriter) Write

func (pw *ProgressWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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