Documentation
¶
Index ¶
- func AddTaskCmd(filePath, description string) tea.Cmd
- func AddTaskWithMetaCmd(filePath, summary, description string, start, due *time.Time, priority int, ...) tea.Cmd
- func EditTaskCmd(t *task.Task, newSummary, body string, start, due *time.Time, priority int, ...) tea.Cmd
- func LinkExistingTaskCmd(t *task.Task, summary, description string, start, due *time.Time, priority int, ...) tea.Cmd
- func LoadCacheCmd(cachePath string) tea.Cmd
- func LoadTasksCmd(vaultPath, taskFilesFolder, cachePath string) tea.Cmd
- func OpenInEditorCmd(filePath string, line int) tea.Cmd
- func PullCalDAVCmd(cfg config.Config) tea.Cmd
- func PushCalDAVCmd(cfg config.CalDAV, t *task.Task) tea.Cmd
- func ToggleTaskCmd(t *task.Task, caldavCfg config.CalDAV) tea.Cmd
- type App
- type CalDAVPushedMsg
- type EditorClosedMsg
- type ErrorMsg
- type PullCalDAVMsg
- type TaskAddedMsg
- type TaskEditedMsg
- type TaskToggledMsg
- type TasksLoadedMsg
- type TasksRefreshedMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTaskCmd ¶
AddTaskCmd appends a plain task with no task file.
func AddTaskWithMetaCmd ¶
func AddTaskWithMetaCmd( filePath, summary, description string, start, due *time.Time, priority int, status string, rrule string, push bool, cfg config.Config, ) tea.Cmd
AddTaskWithMetaCmd creates a task file, writes [[uid|title]] into the target file, and optionally pushes to CalDAV.
func EditTaskCmd ¶
func EditTaskCmd( t *task.Task, newSummary, body string, start, due *time.Time, priority int, status string, rrule string, push bool, cfg config.Config, ) tea.Cmd
EditTaskCmd saves edits to a task.
Plain task, no metadata → rewrite description in-place. Plain task, metadata set → upgrade to linked task (creates task file + wikilink). Linked task → update task file frontmatter, title, body; push to CalDAV if UID set.
func LinkExistingTaskCmd ¶
func LinkExistingTaskCmd( t *task.Task, summary, description string, start, due *time.Time, priority int, status string, rrule string, push bool, cfg config.Config, ) tea.Cmd
LinkExistingTaskCmd converts a plain task into a linked task: creates a task file, rewrites the source line to [[uid|title]], optionally pushes.
func LoadCacheCmd ¶ added in v0.2.0
LoadCacheCmd reads the task cache from disk and returns it instantly.
func LoadTasksCmd ¶
LoadTasksCmd scans the vault, saves the result to cache, and returns a refresh message.
func OpenInEditorCmd ¶ added in v0.2.0
OpenInEditorCmd suspends the TUI and opens filePath in $EDITOR at the given line. vim/nvim/vi get a +N flag to jump directly to the line.
func PullCalDAVCmd ¶
PullCalDAVCmd fetches all VTODOs from the server and syncs local task files.
func PushCalDAVCmd ¶
PushCalDAVCmd pushes an existing task to CalDAV via the push form.
Types ¶
type CalDAVPushedMsg ¶
CalDAVPushedMsg is sent after pushing a task to CalDAV.
type EditorClosedMsg ¶ added in v0.2.0
type EditorClosedMsg struct{ Err error }
EditorClosedMsg is sent when the external editor process exits.
type PullCalDAVMsg ¶
type PullCalDAVMsg struct {
Updated int // task files updated
Created int // new task files created from remote
Notify string // non-empty if folder conflict occurred
Err error
}
PullCalDAVMsg is sent after pulling tasks from CalDAV.
type TaskAddedMsg ¶
type TaskAddedMsg struct {
Description string
Err error
AutoPushErr error // non-nil if auto-push failed (task still saved)
AutoPushUID string // set if auto-push succeeded
}
TaskAddedMsg is sent after a new task is appended to a file.
type TaskEditedMsg ¶
type TaskEditedMsg struct {
Task *task.Task
NewSummary string
Reload bool // true when a plain task was upgraded to a linked task
Err error
CalDAVErr error // non-nil if save succeeded but CalDAV push failed
}
TaskEditedMsg is sent after an edit is saved to disk.
type TaskToggledMsg ¶
type TaskToggledMsg struct {
Task *task.Task
Err error
CalDAVErr error // non-nil if toggle succeeded but CalDAV push failed
}
TaskToggledMsg is sent after a task checkbox is written back to disk.
type TasksLoadedMsg ¶
TasksLoadedMsg is sent when the task cache is loaded instantly on startup.
type TasksRefreshedMsg ¶ added in v0.2.0
TasksRefreshedMsg is sent when the background vault scan completes.