epub

package
v0.0.0-...-1dbadbb Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	Epub *epub.Epub

	// rate limiter for importing assets
	RateLimiter *rate.Limiter
	// contains filtered or unexported fields
}

Writer contains all information and functions to create the final .epub file

func NewWriter

func NewWriter(cfg *config.NovelConfig) *Writer

NewWriter returns a Writer struct

func (*Writer) AddChapter

func (w *Writer) AddChapter(title string, content string, addPrefix bool)

AddChapter adds a chapter to the to our current chapter list

func (*Writer) PolishEpub

func (w *Writer) PolishEpub()

PolishEpub uses calibres ebook-polish command to compress images and fix possible errors which occurred to me multiple times using the bmaupin/go-epub library

func (*Writer) WriteEpub

func (w *Writer) WriteEpub()

WriteEpub writes the generated epub to the file system

Jump to

Keyboard shortcuts

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