internal

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GranularityIds = map[Granularity][]string{
	Day:     {"day"},
	Week:    {"week"},
	Month:   {"month"},
	Quarter: {"quarter"},
	Year:    {"year"},
}
View Source
var Logger = Log{
	Enabled: false,
}

Functions

func GetFocus added in v0.3.0

func GetFocus(path string) string

func Sanitize added in v0.2.2

func Sanitize(text string) string

Types

type Focus added in v0.2.0

type Focus struct {
	Path string `mapstructure:"path"`
}

type Granularity added in v0.5.2

type Granularity enumflag.Flag
const (
	Day Granularity = iota
	Week
	Month
	Quarter
	Year
)

type Journal added in v0.2.0

type Journal struct {
	Id        string
	Vault     string
	Path      string `mapstructure:"path"`
	Extension string `mapstructure:"extension"`
}

func (*Journal) GetEntryName added in v0.6.0

func (journal *Journal) GetEntryName(granularity Granularity, now time.Time) string

func (*Journal) GetEntryPath added in v0.6.0

func (journal *Journal) GetEntryPath(granularity Granularity, now time.Time) string

type Log

type Log struct {
	Enabled bool
}

func (*Log) Log

func (logger *Log) Log(s string)

type Mission

type Mission struct {
	Settings Settings
}

func DefaultInstance

func DefaultInstance() Mission

func NewInstance

func NewInstance(settings Settings) Mission

func (*Mission) Focus added in v0.3.0

func (mission *Mission) Focus() string

func (*Mission) GetTasksFromJournal added in v0.5.0

func (mission *Mission) GetTasksFromJournal(journalName string, granularity Granularity, now time.Time) ([]model.Task, error)

func (*Mission) GetTasksFromPath added in v0.5.0

func (mission *Mission) GetTasksFromPath(path string) ([]model.Task, error)

func (*Mission) Watch

func (mission *Mission) Watch()

type Settings

type Settings struct {
	Vault      Vault
	Journals   map[string]Journal
	Sketchybar Sketchybar
	Focus      Focus
}

func LoadSettings

func LoadSettings() Settings

type Sketchybar

type Sketchybar struct {
	Path       string `mapstructure:"path"`
	TaskEvent  string `mapstructure:"event_task"`
	FocusEvent string `mapstructure:"event_focus"`
}

type Vault added in v0.6.1

type Vault struct {
	Name string
	Path string
}

Jump to

Keyboard shortcuts

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