txt

package
v0.0.0-...-a882927 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChapterTitle

type ChapterTitle struct {
	MaxLength int
	Patterns  []*regexp.Regexp
}

func NewChapterTitle

func NewChapterTitle(patternFile string) *ChapterTitle

func (*ChapterTitle) IsTitle

func (chapterTitle *ChapterTitle) IsTitle(line string) bool

type Txt

type Txt struct {
	Title    string
	FilePath string
	Authors  []string
	Chapters []*TxtChapter
}

func NewTxt

func NewTxt(filePath string, authors []string) *Txt

func (*Txt) ConvertAsKindle

func (txt *Txt) ConvertAsKindle(saveDir string)

func (*Txt) Parse

func (txt *Txt) Parse(titlePatternFile string)

type TxtChapter

type TxtChapter struct {
	Title string
	Lines []string
}

Jump to

Keyboard shortcuts

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