Documentation
¶
Overview ¶
Package epub provides function to write EPUB and xhtml files.
Index ¶
- Variables
- type Book
- func (w *Book) AddCoverImage(r io.Reader) error
- func (w *Book) AddSection(level int, title string, secID string) error
- func (w *Book) AddTitle(title string, authors []string) error
- func (w *Book) Close() error
- func (w *Book) CreateFile(file *File) (io.WriteCloser, error)
- func (w *Book) RegisterFile(baseName, mimeType string, inSpine bool) *File
- func (w *Book) WriteString(s string) error
- type File
- type SecNo
- type TOCEntry
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct {
UUID uuid.UUID
LastModified string
Language string
Title string
Authors []string
Spine []*File
Files map[string]*File
CSSPath string
CoverImageID string
CoverID string
ContentName string
SectionNumber SecNo
SectionLevel int
// contains filtered or unexported fields
}
func (*Book) CreateFile ¶
func (w *Book) CreateFile(file *File) (io.WriteCloser, error)
func (*Book) RegisterFile ¶
func (*Book) WriteString ¶
type SecNo ¶
type SecNo []int
SecNo represents a section number in a document, e.g. `SecNo{1, 2}` represents section 1.2 and `SecNo{1}` represents chapter 1.
Click to show internal directories.
Click to hide internal directories.