render

package
v0.0.0-...-fa1ff54 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCssFile = "css/default.css"

DefaultCssFile the css that is always there for every host

View Source
const GoReaderRenderTempDir = "/tmp/goreader/html"

GoReaderRenderTempDir is the tmp dir for goreader

View Source
const TempCSSFilePath = GoReaderRenderTempDir + "/current.css"

TempCSSFilePath all the css from different sources like default and overrides will be written here first everytime and then this location is set into wkhtmltopdf

View Source
const TempHTMLFilePath = GoReaderRenderTempDir + "/current.html"

TempHTMLFilePath if the file type is a .md, convert to html at this location

Variables

This section is empty.

Functions

func Do

func Do(m *pdfrender.Mod, URL, outputFilePath string) (err error)

Types

type Render

type Render struct {
	// SiteObjectOptions objectOptions coming from options set in webpages-properties
	// these options are passed to the wkhtmltopdf object
	// could be used for overriding default ones in this repository
	SiteObjectOptions *json.RawMessage
	// SiteConverterOptions objectOptions coming from options set in webpages-properties
	// these options are passed to the wkhtmltopdf object
	// could be used for overriding default ones in this repository
	SiteConverterOptions *json.RawMessage
	// ObjectOptions coming from the mod file
	// these options are passed to the wkhtmltopdf object
	// could be used for overriding default ones in this repository
	ObjectOptions *json.RawMessage
	// ConverterOptions coming from the mod file
	// these options are passed to the wkhtmltopdf converter
	// could be used for overriding default ones in this repository
	ConverterOptions *json.RawMessage
	// URL to webPage or path to html page in local
	URL string
	// OutputFilePath the indexed path to write pdf to
	OutputFilePath string
}

func (*Render) CompileMDtoHTML

func (r *Render) CompileMDtoHTML() (err error)

func (*Render) GenPDF

func (r *Render) GenPDF() (err error)

GenPDF receives the final render object OutputFilePath is provided as the destination to write file to as is Also, object and converter options from mod file and webpage-properties files do override defaultly set

Jump to

Keyboard shortcuts

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