Documentation ¶
Index ¶
- Constants
- Variables
- func AppendAction(c *cli.Context) error
- func ConfigAction(c *cli.Context) error
- func EachField(s interface{}, fn EachFunc) error
- func EditAction(c *cli.Context) error
- func FindAction(c *cli.Context) error
- func GrepAction(c *cli.Context) error
- func ListAction(c *cli.Context) error
- func MoveAction(c *cli.Context) error
- type EachFunc
Constants ¶
View Source
const DefaultDateRange = "128d"
Variables ¶
View Source
var AppendCommand = cli.Command{ Name: "append", Aliases: []string{"a"}, Usage: "grep diary", Action: AppendAction, Flags: []cli.Flag{ cli.BoolFlag{ Name: "code, c", Usage: "append code block", }, cli.StringFlag{ Name: "language, g", Usage: "code block language", }, cli.IntFlag{ Name: "before-append, B", Usage: "NUM of blank line to add before content to be append", Value: 1, }, cli.IntFlag{ Name: "after-append, A", Usage: "NUM of blank line to add after content to be append", Value: 1, }, }, }
View Source
var ConfigCommand = cli.Command{ Name: "config", Aliases: []string{"c"}, Usage: "modify config", Action: ConfigAction, Flags: []cli.Flag{ cli.BoolFlag{ Name: "list, l", Usage: "list config", }, cli.StringFlag{ Name: "get", Usage: "get config value", }, }, }
View Source
var EditCommand = cli.Command{ Name: "edit", Aliases: []string{"e"}, Usage: "edit diary", UsageText: "liary mv [command options...] <file suffix>", Action: EditAction, Flags: []cli.Flag{ cli.StringFlag{ Name: "file, f", Usage: "Open specified file", }, cli.StringFlag{ Name: "date, d", Usage: "Open specified date diary", }, cli.IntFlag{ Name: "before, b", Usage: "Open specified before diary by day", }, cli.IntFlag{ Name: "after, a", Usage: "Open specified after diary by day", }, }, }
View Source
var FindCommand = cli.Command{ Name: "find", Aliases: []string{"f"}, Usage: "find and edit diary", Action: FindAction, Flags: []cli.Flag{ cli.StringFlag{ Name: "range, r", Usage: "relative date range", Value: DefaultDateRange, }, cli.BoolFlag{ Name: "all, a", Usage: "show all diary's", }, }, }
View Source
var GrepCommand = cli.Command{ Name: "grep", Aliases: []string{"g"}, Usage: "grep diary", Action: GrepAction, Flags: []cli.Flag{ cli.StringFlag{ Name: "range, r", Usage: "relative date range", Value: DefaultDateRange, }, }, }
View Source
var ListCommand = cli.Command{ Name: "list", Aliases: []string{"l"}, Usage: "list diary", Action: ListAction, Flags: []cli.Flag{ cli.BoolFlag{ Name: "fullpath, f", Usage: "list only this year", }, cli.StringFlag{ Name: "range, r", Usage: "relative date range", Value: DefaultDateRange, }, cli.BoolFlag{ Name: "all, a", Usage: "show all diary's", }, }, }
View Source
var MoveCommand = cli.Command{ Name: "mv", Aliases: []string{"m"}, Usage: "move diary", UsageText: "liary mv [command options...] <source file> <dist file>", Action: MoveAction, Flags: []cli.Flag{}, }
Functions ¶
func AppendAction ¶
func ConfigAction ¶
func EditAction ¶
func FindAction ¶
func GrepAction ¶
func ListAction ¶
func MoveAction ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.