epub

package module
v0.0.0-...-4881b5e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GbkToUtf8

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

func MustGbkToUtf8

func MustGbkToUtf8(s []byte) []byte

func NewEBookWithFiles

func NewEBookWithFiles(author, filename string, files []string) (string, error)

Types

type EBook

type EBook struct {
	Name   string
	Author string

	Epub *epub.Epub
}

func NewEBook

func NewEBook(bookname string, author string) (*EBook, error)

func (*EBook) AddFiles

func (c *EBook) AddFiles(files []string) error

AddFiles

file format:
 - first line: must be the chapter name
 - other lines: are treated as body content.

func (*EBook) AddSectionByFile

func (c *EBook) AddSectionByFile(header string, paragraphs []string) error

func (*EBook) Save

func (c *EBook) Save(filename string) error

Jump to

Keyboard shortcuts

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