mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
CLI: Improve help for cp, mv, thumbs, status, and optimize commands
This commit is contained in:
@@ -55,6 +55,7 @@ func main() {
|
||||
app.Commands = []cli.Command{
|
||||
commands.StartCommand,
|
||||
commands.StopCommand,
|
||||
commands.StatusCommand,
|
||||
commands.IndexCommand,
|
||||
commands.ImportCommand,
|
||||
commands.CopyCommand,
|
||||
@@ -63,9 +64,9 @@ func main() {
|
||||
commands.PasswdCommand,
|
||||
commands.PurgeCommand,
|
||||
commands.CleanUpCommand,
|
||||
commands.OptimizeCommand,
|
||||
commands.ConvertCommand,
|
||||
commands.ThumbsCommand,
|
||||
commands.OptimizeCommand,
|
||||
commands.MomentsCommand,
|
||||
commands.MigrateCommand,
|
||||
commands.BackupCommand,
|
||||
@@ -73,7 +74,6 @@ func main() {
|
||||
commands.ResetCommand,
|
||||
commands.ConfigCommand,
|
||||
commands.VersionCommand,
|
||||
commands.StatusCommand,
|
||||
}
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
// ConvertCommand registers the convert cli command.
|
||||
var ConvertCommand = cli.Command{
|
||||
Name: "convert",
|
||||
Usage: "Converts media files to JPEG and AVC as needed",
|
||||
UsageText: `To limit scope, a PATH may be passed as first argument.`,
|
||||
Usage: "Converts media files in other formats to JPEG / AVC",
|
||||
ArgsUsage: "[path]",
|
||||
Action: convertAction,
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ var CopyCommand = cli.Command{
|
||||
Name: "cp",
|
||||
Aliases: []string{"copy"},
|
||||
Usage: "Copies media files to originals",
|
||||
ArgsUsage: "[path]",
|
||||
Action: copyAction,
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ var ImportCommand = cli.Command{
|
||||
Name: "mv",
|
||||
Aliases: []string{"import"},
|
||||
Usage: "Moves media files to originals",
|
||||
ArgsUsage: "[path]",
|
||||
Action: importAction,
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
// OptimizeCommand registers the index cli command.
|
||||
var OptimizeCommand = cli.Command{
|
||||
Name: "optimize",
|
||||
Usage: "Verifies and optimizes metadata",
|
||||
Usage: "Performs index metadata maintenance",
|
||||
Action: optimizeAction,
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ import (
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
)
|
||||
|
||||
// StatusCommand performs a server health check.
|
||||
// StatusCommand registers the status command.
|
||||
var StatusCommand = cli.Command{
|
||||
Name: "status",
|
||||
Usage: "Performs a server health check",
|
||||
Usage: "Checks if the web server is running",
|
||||
Action: statusAction,
|
||||
}
|
||||
|
||||
// statusAction shows the server health status
|
||||
// statusAction checks if the web server is running.
|
||||
func statusAction(ctx *cli.Context) error {
|
||||
conf := config.NewConfig(ctx)
|
||||
client := &http.Client{Timeout: 10 * time.Second}
|
||||
|
||||
@@ -13,8 +13,7 @@ import (
|
||||
// ThumbsCommand registers the resample cli command.
|
||||
var ThumbsCommand = cli.Command{
|
||||
Name: "thumbs",
|
||||
Aliases: []string{"resample"},
|
||||
Usage: "Pre-renders thumbnail images",
|
||||
Usage: "Pre-renders thumbnail images based on config options",
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "force, f",
|
||||
|
||||
Reference in New Issue
Block a user