cmd

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewMdCmd added in v0.6.1

func NewMdCmd(deps *MdDependencies) *cobra.Command

NewMdCmd creates a new md command with the specified dependencies. If deps is nil, it uses default implementations.

func NewTaskAddCmd added in v0.6.1

func NewTaskAddCmd(deps *TaskAddDependencies) *cobra.Command

NewTaskAddCmd creates a new task add subcommand with the specified dependencies. If deps is nil, it uses default implementations.

func NewTaskCmd added in v0.6.1

func NewTaskCmd() *cobra.Command

NewTaskCmd creates the parent task command.

func ParseDateFromJournalFlag added in v0.6.1

func ParseDateFromJournalFlag(journalFlag string, timeNow func() time.Time) (time.Time, error)

ParseDateFromJournalFlag parses the journal flag and returns the target date. If journalFlag is empty, it returns the current time from timeNow. If journalFlag is not empty, it parses it as YYYY-MM-DD format. Returns an error if the date format is invalid.

Types

type MdDependencies added in v0.6.1

type MdDependencies struct {
	InsertFn  func(*internal.InsertMarkdownOptions) error
	OpenGraph func(string) *logseq.Graph
	ReadStdin func() string
	TimeNow   func() time.Time
}

MdDependencies holds all the dependencies for the md command.

type TaskAddDependencies added in v0.6.1

type TaskAddDependencies struct {
	AddTaskFn func(*internal.AddTaskOptions) error
	OpenGraph func(string) *logseq.Graph
	TimeNow   func() time.Time
}

TaskAddDependencies holds all the dependencies for the task add command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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