From b195b7e4f813d3b56fe9160d64ae73cc6d24aafd Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 6 Oct 2021 08:31:35 +0200 Subject: [PATCH] CLI: Improve moments / thumbs commands and flag descriptions --- cmd/photoprism/photoprism.go | 2 +- internal/commands/faces.go | 4 ++-- internal/commands/moments.go | 4 ++-- internal/commands/thumbs.go | 2 +- internal/commands/users.go | 4 ++-- internal/config/flags.go | 24 ++++++++++++------------ 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cmd/photoprism/photoprism.go b/cmd/photoprism/photoprism.go index 3bda10270..22944c610 100644 --- a/cmd/photoprism/photoprism.go +++ b/cmd/photoprism/photoprism.go @@ -63,9 +63,9 @@ func main() { commands.PurgeCommand, commands.CleanUpCommand, commands.OptimizeCommand, + commands.MomentsCommand, commands.ConvertCommand, commands.ThumbsCommand, - commands.MomentsCommand, commands.MigrateCommand, commands.BackupCommand, commands.RestoreCommand, diff --git a/internal/commands/faces.go b/internal/commands/faces.go index 91695af48..953b08b2f 100644 --- a/internal/commands/faces.go +++ b/internal/commands/faces.go @@ -18,10 +18,10 @@ import ( "github.com/photoprism/photoprism/pkg/txt" ) -// FacesCommand registers the faces cli command. +// FacesCommand registers the facial recognition subcommands. var FacesCommand = cli.Command{ Name: "faces", - Usage: "Facial recognition sub-commands", + Usage: "Facial recognition subcommands", Subcommands: []cli.Command{ { Name: "stats", diff --git a/internal/commands/moments.go b/internal/commands/moments.go index 9ee68de45..7c6859be0 100644 --- a/internal/commands/moments.go +++ b/internal/commands/moments.go @@ -10,14 +10,14 @@ import ( "github.com/photoprism/photoprism/internal/service" ) -// MomentsCommand registers the moments cli command. +// MomentsCommand registers the moments command. var MomentsCommand = cli.Command{ Name: "moments", Usage: "Creates albums of special moments, trips, and places", Action: momentsAction, } -// momentsAction creates albums based on popular locations, dates and labels. +// momentsAction creates albums of special moments, trips, and places. func momentsAction(ctx *cli.Context) error { start := time.Now() diff --git a/internal/commands/thumbs.go b/internal/commands/thumbs.go index f8aa6deb3..0ff2233d9 100644 --- a/internal/commands/thumbs.go +++ b/internal/commands/thumbs.go @@ -13,7 +13,7 @@ import ( // ThumbsCommand registers the resample cli command. var ThumbsCommand = cli.Command{ Name: "thumbs", - Usage: "Regenerates thumbnails based on the current config", + Usage: "Regenerates thumbnails based on the current settings", Flags: []cli.Flag{ cli.BoolFlag{ Name: "force, f", diff --git a/internal/commands/users.go b/internal/commands/users.go index 1113ad83a..29b9ee5c2 100644 --- a/internal/commands/users.go +++ b/internal/commands/users.go @@ -17,10 +17,10 @@ import ( "github.com/photoprism/photoprism/pkg/txt" ) -// UsersCommand registers user management commands. +// UsersCommand registers user management subcommands. var UsersCommand = cli.Command{ Name: "users", - Usage: "User management sub-commands", + Usage: "User management subcommands", Subcommands: []cli.Command{ { Name: "list", diff --git a/internal/config/flags.go b/internal/config/flags.go index 7635b045b..a81a06d62 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -231,29 +231,29 @@ var GlobalFlags = []cli.Flag{ }, cli.StringFlag{ Name: "site-preview", - Usage: "public preview image `URL`", + Usage: "custom site preview image `URL`", EnvVar: "PHOTOPRISM_SITE_PREVIEW", }, cli.StringFlag{ Name: "site-author", - Usage: "artist name or copyright", + Usage: "site owner or `COPYRIGHT`", EnvVar: "PHOTOPRISM_SITE_AUTHOR", }, cli.StringFlag{ Name: "site-title", - Usage: "site title", + Usage: "site `TITLE`", Value: "PhotoPrism", EnvVar: "PHOTOPRISM_SITE_TITLE", }, cli.StringFlag{ Name: "site-caption", - Usage: "site caption", + Usage: "site `CAPTION`", Value: "Browse Your Life", EnvVar: "PHOTOPRISM_SITE_CAPTION", }, cli.StringFlag{ Name: "site-description", - Usage: "site description", + Usage: "site `DESCRIPTION`", EnvVar: "PHOTOPRISM_SITE_DESCRIPTION", }, cli.IntFlag{ @@ -274,7 +274,7 @@ var GlobalFlags = []cli.Flag{ }, cli.StringFlag{ Name: "http-compression, z", - Usage: "enable http compression to improve bandwidth utilization (none or gzip)", + Usage: "http compression `METHOD` (none or gzip)", EnvVar: "PHOTOPRISM_HTTP_COMPRESSION", }, cli.StringFlag{ @@ -333,7 +333,7 @@ var GlobalFlags = []cli.Flag{ }, cli.StringFlag{ Name: "darktable-blacklist", - Usage: "disable Darktable for specific file `EXTENSIONS`", + Usage: "file `EXTENSIONS` not to be converted with Darktable", Value: "raf,cr3,dng", EnvVar: "PHOTOPRISM_DARKTABLE_BLACKLIST", }, @@ -345,7 +345,7 @@ var GlobalFlags = []cli.Flag{ }, cli.StringFlag{ Name: "rawtherapee-blacklist", - Usage: "disable RawTherapee for specific file `EXTENSIONS`", + Usage: "file `EXTENSIONS` not to be converted with RawTherapee", Value: "", EnvVar: "PHOTOPRISM_RAWTHERAPEE_BLACKLIST", }, @@ -393,12 +393,12 @@ var GlobalFlags = []cli.Flag{ }, cli.StringFlag{ Name: "download-token", - Usage: "optional custom download url `TOKEN`", + Usage: "custom download URL `TOKEN` (generated automatically by default)", EnvVar: "PHOTOPRISM_DOWNLOAD_TOKEN", }, cli.StringFlag{ Name: "preview-token", - Usage: "optional custom thumbnail and streaming url `TOKEN`", + Usage: "custom thumbnail and streaming URL `TOKEN` (generated automatically by default)", EnvVar: "PHOTOPRISM_PREVIEW_TOKEN", }, cli.StringFlag{ @@ -474,13 +474,13 @@ var GlobalFlags = []cli.Flag{ }, cli.Float64Flag{ Name: "face-cluster-dist", - Usage: "similarity distance of faces forming a cluster core", + Usage: "similarity `DISTANCE` of faces forming a cluster core", Value: face.ClusterDist, EnvVar: "PHOTOPRISM_FACE_CLUSTER_DIST", }, cli.Float64Flag{ Name: "face-match-dist", - Usage: "similarity offset for matching faces with existing clusters", + Usage: "similarity `OFFSET` for matching faces with existing clusters", Value: face.MatchDist, EnvVar: "PHOTOPRISM_FACE_MATCH_DIST", },