output

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableThemes

func AvailableThemes() []string

AvailableThemes returns a list of available preset theme names

func WriteJSON

func WriteJSON(w io.Writer, data any) error

WriteJSON writes data as indented JSON to the writer

Types

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

func NewFormatter

func NewFormatter(w io.Writer, theme *Theme) *Formatter

func (*Formatter) AreaCreated

func (f *Formatter) AreaCreated(a *area.Area)

func (*Formatter) AreaDeleted

func (f *Formatter) AreaDeleted(a *area.Area)

func (*Formatter) AreaList

func (f *Formatter) AreaList(areas []area.Area)

func (*Formatter) AreaRenamed

func (f *Formatter) AreaRenamed(oldName, newName string)

func (*Formatter) BulkEditPreview

func (f *Formatter) BulkEditPreview(tasks []task.Task)

func (*Formatter) BulkEditSummary

func (f *Formatter) BulkEditSummary(count int)

func (*Formatter) Error

func (f *Formatter) Error(msg string)

func (*Formatter) GroupedLogbook

func (f *Formatter) GroupedLogbook(tasks []task.Task, groupBy string)

GroupedLogbook displays completed tasks grouped by the specified field. For date grouping, it uses CompletedAt instead of PlannedDate.

func (*Formatter) GroupedTaskList

func (f *Formatter) GroupedTaskList(tasks []task.Task, groupBy string)

GroupedTaskList displays tasks grouped by the specified field. groupBy can be: "scope", "date", or "none" (falls back to TaskList)

func (*Formatter) Logbook

func (f *Formatter) Logbook(tasks []task.Task)

func (*Formatter) ProjectAreaCleared

func (f *Formatter) ProjectAreaCleared(p *task.Task)

func (*Formatter) ProjectCreated

func (f *Formatter) ProjectCreated(p *task.Task)

func (*Formatter) ProjectDeleted

func (f *Formatter) ProjectDeleted(p *task.Task)

func (*Formatter) ProjectDetails

func (f *Formatter) ProjectDetails(p *task.Task)

func (*Formatter) ProjectEdited

func (f *Formatter) ProjectEdited(name string, changes []string)

func (*Formatter) ProjectMoved

func (f *Formatter) ProjectMoved(p *task.Task, areaName string)

func (*Formatter) ProjectRenamed

func (f *Formatter) ProjectRenamed(oldName, newName string)

func (*Formatter) ProjectsCompleted

func (f *Formatter) ProjectsCompleted(results []task.CompleteResult)

func (*Formatter) ProjectsUncompleted

func (f *Formatter) ProjectsUncompleted(projects []task.Task)

func (*Formatter) SetHidePlannedDate

func (f *Formatter) SetHidePlannedDate(hide bool)

func (*Formatter) SetHideScope

func (f *Formatter) SetHideScope(hide bool)

func (*Formatter) TagDeleted

func (f *Formatter) TagDeleted(tagName string, count int64)

func (*Formatter) TagList

func (f *Formatter) TagList(tags []string)

func (*Formatter) TaskCreated

func (f *Formatter) TaskCreated(t *task.Task)

func (*Formatter) TaskDetails

func (f *Formatter) TaskDetails(t *task.Task)

func (*Formatter) TaskDueDateSet

func (f *Formatter) TaskDueDateSet(t *task.Task)

func (*Formatter) TaskEdited

func (f *Formatter) TaskEdited(id int64, changes []string)

func (*Formatter) TaskList

func (f *Formatter) TaskList(tasks []task.Task)

func (*Formatter) TaskPlannedDateSet

func (f *Formatter) TaskPlannedDateSet(t *task.Task)

func (*Formatter) TaskRecurrenceEndSet

func (f *Formatter) TaskRecurrenceEndSet(t *task.Task)

func (*Formatter) TaskRecurrenceInfo

func (f *Formatter) TaskRecurrenceInfo(t *task.Task)

func (*Formatter) TaskRecurrencePaused

func (f *Formatter) TaskRecurrencePaused(t *task.Task)

func (*Formatter) TaskRecurrenceResumed

func (f *Formatter) TaskRecurrenceResumed(t *task.Task)

func (*Formatter) TaskRecurrenceSet

func (f *Formatter) TaskRecurrenceSet(t *task.Task)

func (*Formatter) TaskTagAdded

func (f *Formatter) TaskTagAdded(t *task.Task, tagName string)

func (*Formatter) TaskTagRemoved

func (f *Formatter) TaskTagRemoved(t *task.Task, tagName string)

func (*Formatter) TasksCompleted

func (f *Formatter) TasksCompleted(results []task.CompleteResult)

func (*Formatter) TasksDeleted

func (f *Formatter) TasksDeleted(tasks []task.Task)

func (*Formatter) TasksUncompleted

func (f *Formatter) TasksUncompleted(tasks []task.Task)

type Icons

type Icons struct {
	Planned string
	Due     string
	Date    string
	Done    string
	Note    string
}

Icons holds customizable icon characters

type Theme

type Theme struct {
	Muted   lipgloss.Style
	Accent  lipgloss.Style
	Warning lipgloss.Style
	Success lipgloss.Style
	Error   lipgloss.Style
	Header  lipgloss.Style
	ID      lipgloss.Style
	Scope   lipgloss.Style
	Icons   Icons
}

Theme holds pre-built Lipgloss styles for consistent output formatting

func DefaultTheme

func DefaultTheme() *Theme

DefaultTheme returns the default theme matching the original hardcoded values

func NewTheme

func NewTheme(cfg *config.ThemeConfig) *Theme

NewTheme creates a Theme from config, using defaults for unset values

Jump to

Keyboard shortcuts

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