print

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable added in v0.20.0

func CreateTable(
	options PrintTableOptions,
	defaultHeaders []string,
	taskHeaders []string,
) table.Writer

func FormatTable added in v0.20.0

func FormatTable(theme dao.Theme) table.Style

func GetAlign added in v0.20.0

func GetAlign(s string) text.Align

Align map against go-pretty/table

func GetAttr added in v0.20.0

func GetAttr(s string) *text.Color

Attr (color) map against go-pretty/table (attributes belong to the same types as fg/bg)

func GetBg added in v0.20.0

func GetBg(s string) *text.Color

Background color map against go-pretty/table

func GetFg added in v0.20.0

func GetFg(s string) *text.Color

Foreground color map against go-pretty/table

func GetFormat added in v0.20.0

func GetFormat(s string) text.Format

Format map against go-pretty/table

func PrintProjectBlocks

func PrintProjectBlocks(projects []dao.Project)

func PrintTable added in v0.20.0

func PrintTable[T Items](
	data []T,
	options PrintTableOptions,
	defaultHeaders []string,
	taskHeaders []string,
)

func PrintTaskBlock added in v0.6.1

func PrintTaskBlock(tasks []dao.Task)

func PrintTree added in v0.6.1

func PrintTree(config *dao.Config, theme dao.Theme, listFlags *core.ListFlags, tree []dao.TreeNode)

func RenderTable added in v0.20.0

func RenderTable(t table.Writer, output string)

Types

type Items added in v0.20.0

type Items interface {
	GetValue(string, int) string
}

type PrintTableOptions added in v0.20.0

type PrintTableOptions struct {
	Output               string
	Theme                dao.Theme
	Tree                 bool
	OmitEmpty            bool
	SuppressEmptyColumns bool
}

Jump to

Keyboard shortcuts

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