ebook

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Copyright 2022 Hal Canary Use of this program is governed by the file LICENSE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToEbook added in v0.5.0

func ConvertToEbook(src, dst string, arguments ...string) error

Types

type Chapter

type Chapter struct {
	Title    string
	Url      string
	Content  *Node
	Modified time.Time
}

type EbookInfo

type EbookInfo struct {
	Authors  string
	Comments string
	Title    string
	Source   string
	Language string
	Chapters []Chapter
	Modified time.Time
	Cover    []byte
}

Ebook content and metadata.

func (EbookInfo) CalculateLastModified

func (info EbookInfo) CalculateLastModified() time.Time

Return the time of most recently modified chapter.

func (EbookInfo) Write

func (info EbookInfo) Write(dst io.Writer) error

Write the ebook as an Epub.

func (EbookInfo) WriteHtml added in v0.5.0

func (info EbookInfo) WriteHtml(dst io.Writer) error

type Node

type Node = dom.Node

func Cleanup

func Cleanup(node *Node) *Node

Clean up a HTML fragment.

Jump to

Keyboard shortcuts

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