hook

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoActiveTracking = errors.New("No active tracking")
View Source
var ErrNoRecurrenceBase = errors.New("when the recurrence tag is set, either the due tag or the threshold tag (or both) must be set")

Functions

func NewRecurrence

func NewRecurrence(tags RecurrenceTags, opts ...func(Recurrence) Recurrence) todotxt.Hook

func NewTagExpansion

func NewTagExpansion(unknownTags bool, tags map[string]qselect.DType) todotxt.Hook

func NewTagExpansionWithNowFunc

func NewTagExpansionWithNowFunc(unknownTags bool, tags map[string]qselect.DType, now func() time.Time) todotxt.Hook

func WithNowFunc

func WithNowFunc(now func() time.Time) func(r Recurrence) Recurrence

func WithPreservePriority

func WithPreservePriority(preserve bool) func(r Recurrence) Recurrence

Types

type ClearOnDone

type ClearOnDone struct {
	Clear []string
}

func (ClearOnDone) OnMod

func (c ClearOnDone) OnMod(list *todotxt.List, event todotxt.ModEvent) error

func (ClearOnDone) OnValidate

func (c ClearOnDone) OnValidate(list *todotxt.List, event todotxt.ValidationEvent) error

type Recurrence

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

func (Recurrence) OnMod

func (r Recurrence) OnMod(list *todotxt.List, event todotxt.ModEvent) error

func (Recurrence) OnValidate

func (r Recurrence) OnValidate(list *todotxt.List, event todotxt.ValidationEvent) error

type RecurrenceTags

type RecurrenceTags struct {
	Rec       string
	Due       string
	Threshold string
}

type TagExpansion

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

func (TagExpansion) OnMod

func (t TagExpansion) OnMod(list *todotxt.List, event todotxt.ModEvent) error

func (TagExpansion) OnValidate

func (t TagExpansion) OnValidate(list *todotxt.List, event todotxt.ValidationEvent) error

type Tracker added in v0.4.0

type Tracker interface {
	Start(tags []string) error
	Stop() error
	ActiveTags() ([]string, error)
	SetTags(tags []string) error
}

type Tracking added in v0.4.0

type Tracking struct {
	Tracker           Tracker
	Tag               string
	TrimProjectPrefix bool
	TrimContextPrefix bool
	IncludeTags       []string
}

func NewTracking added in v0.4.0

func NewTracking(tag string, tracker Tracker) *Tracking

func (Tracking) OnMod added in v0.4.0

func (t Tracking) OnMod(list *todotxt.List, event todotxt.ModEvent) error

func (Tracking) OnValidate added in v0.4.0

func (Tracking) OnValidate(list *todotxt.List, event todotxt.ValidationEvent) error

Jump to

Keyboard shortcuts

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