output

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportFormat = fmt.Errorf("Unsupport Conversion Format")
)
View Source
var MarkdownTemplate = `` /* 484-byte string literal not displayed */

MarkdownTemplate is Markdown format Template

Parameters:
- `store`: Store.store
- `opts`: Options
View Source
var TxtTemplate = `` /* 273-byte string literal not displayed */

Functions

func MarkdownEscape

func MarkdownEscape(s string) string

func Output

func Output(src store.Store, format string, outpath string, opts Option) (err error)

func RegOutputFormat

func RegOutputFormat(s string, conv Conversion)

Types

type Conversion

type Conversion interface {
	Conv(src store.Store, outpath string, opts Option) error
}

type EPUB

type EPUB struct {
}

func (*EPUB) Conv

func (t *EPUB) Conv(src store.Store, outpath string, opts Option) (err error)

type Markdown

type Markdown struct {
}

func (*Markdown) Conv

func (t *Markdown) Conv(src store.Store, outpath string, opts Option) (err error)

type MarkdownEPUBmeta

type MarkdownEPUBmeta struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	Author      string `yaml:"creator"`
	Lang        string `yaml:"lang"`
	Cover       string `yaml:"cover-image"`
}

type MarkdownTemplateValues

type MarkdownTemplateValues struct {
	Store    store.Store
	Opts     Option
	EPUBMeta MarkdownEPUBmeta
}

type Option

type Option struct {
	IgnoreCover    bool // 忽略封面
	NoEPUBMetadata bool // 不添加EPUB元数据
}

Option is Convert output options

type TXT

type TXT struct {
}

func (*TXT) Conv

func (t *TXT) Conv(src store.Store, outpath string, opts Option) (err error)

Jump to

Keyboard shortcuts

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