converter

package
v0.0.0-...-9316729 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter interface {
	Convert() error
	WithOutputDir(string) error
	WithWebFiles([]string) error
}

Converter is an interface to allow convert into files different formats

func NewConverter

func NewConverter(format string, opts ...Option) (Converter, error)

NewConverter get the strategy converter to convert the files into the format selected

func NewPandocConverter

func NewPandocConverter() (Converter, error)

NewPandocConverter a converter based on pandoc application

type ConverterFormat

type ConverterFormat string

ConverterFormat output format type supported by the application

const (
	//EpubFormat output format epub
	EpubFormat ConverterFormat = "epub"
)

type Option

type Option func(Converter) error

func WithOutputDir

func WithOutputDir(outputDir string) Option

func WithWebFiles

func WithWebFiles(webFiles []string) Option

Jump to

Keyboard shortcuts

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