md2pdf

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// VersionMajor is set during build
	VersionMajor string
	// VersionMinor is set during build
	VersionMinor string
	// VersionPatch is set during build
	VersionPatch string
	// VersionHash is set during build
	VersionHash string
	// VersionDate is set during build
	VersionDate string
)
View Source
var Version = VersionInfo{
	Major: VersionMajor,
	Minor: VersionMinor,
	Patch: VersionPatch,
	Hash:  VersionHash,
	Date:  VersionDate,
}

Version is for use in the version subcommand.

Functions

func Debug

func Debug(path, debugDir string) error

Debug outputs not only a PDF, but also HTML and JSON output for debugging.

func MdBytesToPdfFile added in v0.0.5

func MdBytesToPdfFile(mdBytes []byte, outPath string) (string, error)

MdBytesToPdfFile can be used to render markdown input from stdin. The path to the new PDF file is returned along with any encountered errors.

func MdFileToPdfFile

func MdFileToPdfFile(inPath, outPath string) (string, error)

MdFileToPdfFile converts a markdown file to a PDF file. The path to the new PDF file is returned along with any encountered errors.

func MdURLToPdfFile

func MdURLToPdfFile(url, outPath string) (string, error)

MdURLToPdfFile converts a markdown file at a given URL to a pdf file. The path to the new PDF file is returned along with any encountered errors.

Types

type VersionInfo added in v0.0.2

type VersionInfo struct {
	Major string
	Minor string
	Patch string
	Hash  string
	Date  string
}

VersionInfo about a build of md2pdf.

func (VersionInfo) String added in v0.0.2

func (v VersionInfo) String() string

Jump to

Keyboard shortcuts

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