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
NewTaskCmd creates the parent task command.
func ParseDateFromJournalFlag ¶ added in v0.6.1
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.