noteplan

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = Log{
	Enabled: false,
}

Functions

This section is empty.

Types

type Log

type Log struct {
	Enabled bool
}

func (*Log) Log

func (logger *Log) Log(s string)

type Noteplan

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

func NewInstance

func NewInstance() Noteplan

func (*Noteplan) Day

func (noteplan *Noteplan) Day(dateTime time.Time, failFast bool) (*TaskSummary, error)

func (*Noteplan) GetTasks

func (noteplan *Noteplan) GetTasks(dateTime time.Time, tp TimePrecision) ([]Task, error)

func (*Noteplan) Week

func (noteplan *Noteplan) Week(dateTime time.Time, failFast bool) (*TaskSummary, error)

type Settings

type Settings struct {
	CalendarDataPath string
	NoteCachePath    string
	IsAsteriskTodo   bool
	IsDashTodo       bool
	Extension        string `default:"md"`
}

func LoadSettings

func LoadSettings() Settings

type Task

type Task struct {
	Category TaskCategory
	State    TaskState
	Text     string
	Depth    int
}

func (Task) String

func (t Task) String() string

type TaskCategory

type TaskCategory int64
const (
	Bullet TaskCategory = iota
	Checklist
	Todo
)

type TaskState

type TaskState int64
const (
	Open TaskState = iota
	Cancelled
	Done
)

func (TaskState) Trigger

func (s TaskState) Trigger() string

type TaskSummary

type TaskSummary struct {
	Iso    string `json:"iso"`
	Open   int    `json:"open"`
	Closed int    `json:"closed"`
}

type TimePrecision added in v0.2.2

type TimePrecision int64
const (
	Day TimePrecision = iota
	Week
	Month
	Year
)

func BuildTimePrecision added in v0.2.2

func BuildTimePrecision(d time.Duration) (TimePrecision, error)

func (TimePrecision) String added in v0.2.3

func (tp TimePrecision) String() string

Jump to

Keyboard shortcuts

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