core

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: BSD-3-Clause Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SDNAMESPACE is the speedata XTS layout rules namespace
	SDNAMESPACE string = "urn:speedata.de/2021/xts/en"
	// LevelNotice is used for messages from Message
	LevelNotice = slog.Level(2)
)

Variables

View Source
var (

	// Version is a semantic version
	Version string
)

Functions

func AddDir

func AddDir(dirname string) error

AddDir recursively adds a directory to the file list

func FindFile

func FindFile(filename string) (string, error)

FindFile returns the full path to the file name.

func FindFontFiles

func FindFontFiles() []string

FindFontFiles returns a list of all font files (otf,ttf)

func FontFolder

func FontFolder() (string, error)

FontFolder

func InitDirs

func InitDirs(basedir string) error

InitDirs starts indexing the files.

func RunXTS

func RunXTS(cfg *XTSConfig) error

RunXTS is the entry point

Types

type PublishingInfo added in v0.0.19

type PublishingInfo struct {
	Pages    int
	FileSize int64
}

PublishingInfo contains information about a previous publishing run.

type TypesettingError added in v0.0.3

type TypesettingError struct {
	Logged bool
	Msg    string
}

A TypesettingError contains the information if it has been logged, so it does not appear more than once in the output.

func (TypesettingError) Error added in v0.0.3

func (te TypesettingError) Error() string

type VTrace

type VTrace int

VTrace determines the type of visual tracing

const (
	// VTraceGrid shows the page grid
	VTraceGrid VTrace = iota
	// VTraceAllocation shows allocated cells
	VTraceAllocation
	// VTraceHyphenation shows hyphenation points
	VTraceHyphenation
	// VTraceObjects shows objects
	VTraceObjects
)

type XTSConfig

type XTSConfig struct {
	Datafile     io.Reader
	DumpFile     io.Writer
	FindFile     func(string) (string, error)
	Jobname      string
	Layoutfile   io.Reader
	Mode         []string
	Outfile      io.WriteCloser
	OutFilename  string
	SuppressInfo bool
	Tracing      []string
	Variables    map[string]any
	Info         PublishingInfo
}

XTSConfig is the configuration file for PDF generation.

Jump to

Keyboard shortcuts

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