Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Metadata: Improve CLI command descriptions #1736
  • Loading branch information
lastzero committed Nov 18, 2021
1 parent 73ffa53 commit 9da2e92
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 19 deletions.
5 changes: 2 additions & 3 deletions internal/commands/cleanup.go
Expand Up @@ -5,7 +5,6 @@ import (
"time"

"github.com/dustin/go-humanize/english"

"github.com/urfave/cli"

"github.com/photoprism/photoprism/internal/config"
Expand All @@ -16,7 +15,7 @@ import (
// CleanUpCommand registers the cleanup command.
var CleanUpCommand = cli.Command{
Name: "cleanup",
Usage: "Removes orphan index entries and thumbnails",
Usage: "Removes orphan index entries and thumbnail files",
Flags: cleanUpFlags,
Action: cleanUpAction,
}
Expand Down Expand Up @@ -45,7 +44,7 @@ func cleanUpAction(ctx *cli.Context) error {
conf.InitDb()

if conf.ReadOnly() {
log.Infof("cleanup: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

w := service.CleanUp()
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/convert.go
Expand Up @@ -16,7 +16,7 @@ import (
// ConvertCommand registers the convert cli command.
var ConvertCommand = cli.Command{
Name: "convert",
Usage: "Transcodes files in other formats to JPEG / AVC",
Usage: "Transcodes other formats to JPEG and AVC",
ArgsUsage: "[path]",
Action: convertAction,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/faces.go
Expand Up @@ -245,7 +245,7 @@ func facesIndexAction(ctx *cli.Context) error {
}

if conf.ReadOnly() {
log.Infof("index: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

var indexed fs.Done
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/index.go
Expand Up @@ -63,7 +63,7 @@ func indexAction(ctx *cli.Context) error {
}

if conf.ReadOnly() {
log.Infof("index: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

var indexed fs.Done
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/moments.go
Expand Up @@ -34,7 +34,7 @@ func momentsAction(ctx *cli.Context) error {
conf.InitDb()

if conf.ReadOnly() {
log.Infof("moments: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

w := service.Moments()
Expand Down
6 changes: 3 additions & 3 deletions internal/commands/optimize.go
Expand Up @@ -14,11 +14,11 @@ import (
// OptimizeCommand registers the index cli command.
var OptimizeCommand = cli.Command{
Name: "optimize",
Usage: "Performs photo metadata maintenance",
Usage: "Updates estimates, titles, and descriptions",
Action: optimizeAction,
}

// optimizeAction starts metadata check and optimization.
// optimizeAction updates metadata such as titles and estimate.
func optimizeAction(ctx *cli.Context) error {
start := time.Now()

Expand All @@ -35,7 +35,7 @@ func optimizeAction(ctx *cli.Context) error {
conf.InitDb()

if conf.ReadOnly() {
log.Infof("optimize: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

worker := workers.NewMeta(conf)
Expand Down
4 changes: 2 additions & 2 deletions internal/commands/places.go
Expand Up @@ -17,11 +17,11 @@ import (
// PlacesCommand registers the places subcommands.
var PlacesCommand = cli.Command{
Name: "places",
Usage: "Geolocation management subcommands",
Usage: "Geodata management subcommands",
Subcommands: []cli.Command{
{
Name: "update",
Usage: "Updates the index with the latest geodata from our backend",
Usage: "Updates your index with the latest location data",
Action: placesUpdateAction,
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/purge.go
Expand Up @@ -62,7 +62,7 @@ func purgeAction(ctx *cli.Context) error {
}

if conf.ReadOnly() {
log.Infof("purge: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

w := service.Purge()
Expand Down
4 changes: 2 additions & 2 deletions internal/commands/reset.go
Expand Up @@ -18,7 +18,7 @@ import (
// ResetCommand resets the index and removes sidecar files after confirmation.
var ResetCommand = cli.Command{
Name: "reset",
Usage: "Resets the index and removes JSON / YAML sidecar files",
Usage: "Resets the index and removes generated sidecar files",
Action: resetAction,
}

Expand All @@ -27,7 +27,7 @@ func resetAction(ctx *cli.Context) error {
log.Warnf("YOU ARE ABOUT TO RESET THE INDEX AND REMOVE ALL JSON / YAML SIDECAR FILES")

removeIndexPrompt := promptui.Prompt{
Label: "Reset index database incl all albums and metadata?",
Label: "Reset index database including albums and metadata?",
IsConfirm: true,
}

Expand Down
2 changes: 1 addition & 1 deletion internal/commands/start.go
Expand Up @@ -104,7 +104,7 @@ func startAction(ctx *cli.Context) error {
}

if conf.ReadOnly() {
log.Infof("start: read-only mode enabled")
log.Infof("config: read-only mode enabled")
}

// start web server
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/thumbs.go
Expand Up @@ -13,7 +13,7 @@ import (
// ThumbsCommand registers the resample cli command.
var ThumbsCommand = cli.Command{
Name: "thumbs",
Usage: "Regenerates thumbnails based on the current settings",
Usage: "Generates thumbnails using the current settings",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "force, f",
Expand Down
4 changes: 2 additions & 2 deletions internal/config/flags.go
Expand Up @@ -344,7 +344,7 @@ var GlobalFlags = []cli.Flag{
},
cli.StringFlag{
Name: "darktable-blacklist",
Usage: "RAW file `EXTENSIONS` incompatible with Darktable",
Usage: "file `EXTENSIONS` incompatible with Darktable",
Value: "cr3,dng",
EnvVar: "PHOTOPRISM_DARKTABLE_BLACKLIST",
},
Expand All @@ -356,7 +356,7 @@ var GlobalFlags = []cli.Flag{
},
cli.StringFlag{
Name: "rawtherapee-blacklist",
Usage: "RAW file `EXTENSIONS` incompatible with RawTherapee",
Usage: "file `EXTENSIONS` incompatible with RawTherapee",
Value: "",
EnvVar: "PHOTOPRISM_RAWTHERAPEE_BLACKLIST",
},
Expand Down

0 comments on commit 9da2e92

Please sign in to comment.