Update usage strings
This commit is contained in:
parent
17cd8a0db7
commit
6683876d25
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
var actionCmd = &cobra.Command{
|
||||
Use: "action",
|
||||
Use: "action --source name --action name {--item id | -- [argv]}",
|
||||
GroupID: sourceGroup.ID,
|
||||
Short: "Manage and run source actions",
|
||||
Long: fmt.Sprintf(`Manage and run source actions on items.
|
||||
@ -51,6 +51,7 @@ In a dry run, the item will be printed in the chosen format and not updated.
|
||||
boolArg(cmd, "force"),
|
||||
)
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
var envCmd = &cobra.Command{
|
||||
Use: "env",
|
||||
Use: "env --source name --env NAME=VALUE [--env NAME=VALUE ...]",
|
||||
GroupID: sourceGroup.ID,
|
||||
Short: "Manage source environment variables",
|
||||
Long: `Add, edit, list, or delete environment variables.
|
||||
@ -21,6 +21,7 @@ action executions.
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
sourceEnv(stringArg(cmd, "source"), stringArrayArg(cmd, "env"))
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
var feedCmd = &cobra.Command{
|
||||
Use: "feed",
|
||||
Use: "feed [{--source name | --channel name}] [--all]",
|
||||
GroupID: feedGroup.ID,
|
||||
Short: "Display the item feed",
|
||||
Long: fmt.Sprintf(`Display the intake item feed in various formats.
|
||||
@ -24,6 +24,7 @@ The default format is "headlines".
|
||||
boolArg(cmd, "all"),
|
||||
)
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
var listCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Use: "list {--sources | --channels | --channel name | --source name --actions | --source name --envs | --source name --argv action}",
|
||||
GroupID: sourceGroup.ID,
|
||||
Aliases: []string{"ls"},
|
||||
Short: "List sources, channels, or actions",
|
||||
@ -29,6 +29,7 @@ var listCmd = &cobra.Command{
|
||||
stringArg(cmd, "source"),
|
||||
)
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
type OptString struct {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
var migrateCmd = &cobra.Command{
|
||||
Use: "migrate",
|
||||
Use: "migrate [--list]",
|
||||
Short: "Migrate an intake database to the latest version",
|
||||
Long: `Migrate an intake database to the latest version.
|
||||
|
||||
@ -18,6 +18,7 @@ Note that the database will be created if it does not exist, even with --list.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
migrate(boolArg(cmd, "list"))
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -22,20 +22,20 @@ their INTAKE_FETCH environment variables. A schedule may be:
|
||||
- "on DOW[,DOW[...]] [at ...]", where DOW is an abbreviated weekday
|
||||
- "on M/D[,M/D[...]] [at ...]", where M/D is a month and day
|
||||
`,
|
||||
Example: `
|
||||
every 5m Every 5 minutes (00:00, 00:05, ...)
|
||||
every 1d Once per day (at midnight)
|
||||
every 7d Once per week (at midnight Sunday)
|
||||
at 08:00 Once per day at 08:00
|
||||
at 06:00,18:00 Twice per day at 6am and 6pm
|
||||
on Tue,Thu Twice a week, on Tue and Thu
|
||||
on Mon,Fri at 12:00 Twice a week, at noon on Monday and Friday
|
||||
on 3/25 Once a year on March 25
|
||||
on */7 Each month on the 7th
|
||||
Example: ` every 5m Every 5 minutes (00:00, 00:05, ...)
|
||||
every 1d Once per day (at midnight)
|
||||
every 7d Once per week (at midnight Sunday)
|
||||
at 08:00 Once per day at 08:00
|
||||
at 06:00,18:00 Twice per day at 6am and 6pm
|
||||
on Tue,Thu Twice a week, on Tue and Thu
|
||||
on Mon,Fri at 12:00 Twice a week, at noon on Monday and Friday
|
||||
on 3/25 Once a year on March 25
|
||||
on */7 Each month on the 7th
|
||||
`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
monitor()
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
var passwdCmd = &cobra.Command{
|
||||
Use: "passwd",
|
||||
Use: "passwd [--verify] [--stdin]",
|
||||
GroupID: webGroup.ID,
|
||||
Short: "Set the password for the web interface",
|
||||
Long: `Set the password for the web interface.
|
||||
@ -25,6 +25,7 @@ the --stdin flag.
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
passwd(boolArg(cmd, "verify"), boolArg(cmd, "stdin"))
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
var serveCmd = &cobra.Command{
|
||||
Use: "serve",
|
||||
Use: "serve [--addr address] [--port port]",
|
||||
GroupID: webGroup.ID,
|
||||
Short: "Serve the web interface",
|
||||
Long: `Serve the intake web interface.
|
||||
@ -19,6 +19,7 @@ var serveCmd = &cobra.Command{
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
serve(stringArg(cmd, "addr"), stringArg(cmd, "port"))
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
var sourceCmd = &cobra.Command{
|
||||
Use: "source",
|
||||
Use: "source {--add name | --delete name [--yes]}",
|
||||
GroupID: sourceGroup.ID,
|
||||
Short: "Manage sources",
|
||||
Long: `Manage sources.
|
||||
@ -22,6 +22,7 @@ update the feed.
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
source(stringArg(cmd, "add"), stringArg(cmd, "delete"), boolArg(cmd, "yes"))
|
||||
},
|
||||
DisableFlagsInUseLine: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
Loading…
Reference in New Issue
Block a user