CLI: Improve flag order, names, and descriptions #2195
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
30da260a11
commit
d9cc0c5a83
3 changed files with 16 additions and 16 deletions
|
@ -151,12 +151,12 @@ func configAction(ctx *cli.Context) error {
|
|||
fmt.Printf("%-25s %s\n", "preview-token", conf.PreviewToken())
|
||||
fmt.Printf("%-25s %s\n", "thumb-color", conf.ThumbColor())
|
||||
fmt.Printf("%-25s %s\n", "thumb-filter", conf.ThumbFilter())
|
||||
fmt.Printf("%-25s %t\n", "thumb-uncached", conf.ThumbUncached())
|
||||
fmt.Printf("%-25s %d\n", "thumb-size", conf.ThumbSizePrecached())
|
||||
fmt.Printf("%-25s %d\n", "thumb-size-uncached", conf.ThumbSizeUncached())
|
||||
fmt.Printf("%-25s %t\n", "thumb-uncached", conf.ThumbUncached())
|
||||
fmt.Printf("%-25s %s\n", "thumb-path", conf.ThumbPath())
|
||||
fmt.Printf("%-25s %d\n", "jpeg-size", conf.JpegSize())
|
||||
fmt.Printf("%-25s %d\n", "jpeg-quality", conf.JpegQuality())
|
||||
fmt.Printf("%-25s %d\n", "jpeg-size", conf.JpegSize())
|
||||
|
||||
// Facial Recognition.
|
||||
fmt.Printf("%-25s %d\n", "face-size", conf.FaceSize())
|
||||
|
|
|
@ -484,11 +484,6 @@ var GlobalFlags = []cli.Flag{
|
|||
Value: "lanczos",
|
||||
EnvVar: "PHOTOPRISM_THUMB_FILTER",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "thumb-uncached, x",
|
||||
Usage: "enable on-demand creation of missing thumbnails (high memory and cpu usage)",
|
||||
EnvVar: "PHOTOPRISM_THUMB_UNCACHED",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "thumb-size, ts",
|
||||
Usage: "maximum size of thumbnails created during indexing in `PIXELS` (720-7680)",
|
||||
|
@ -501,21 +496,26 @@ var GlobalFlags = []cli.Flag{
|
|||
Value: 7680,
|
||||
EnvVar: "PHOTOPRISM_THUMB_SIZE_UNCACHED",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "jpeg-size, js",
|
||||
Usage: "maximum size of created JPEG sidecar files in `PIXELS` (720-30000)",
|
||||
Value: 7680,
|
||||
EnvVar: "PHOTOPRISM_JPEG_SIZE",
|
||||
cli.BoolFlag{
|
||||
Name: "thumb-uncached, x",
|
||||
Usage: "enable on-demand creation of missing thumbnails (high memory and cpu usage)",
|
||||
EnvVar: "PHOTOPRISM_THUMB_UNCACHED",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "jpeg-quality, jq",
|
||||
Name: "jpeg-quality, q",
|
||||
Usage: "`QUALITY` of created JPEG sidecars and thumbnails (25-100, best, high, default, low, worst)",
|
||||
Value: thumb.JpegQuality.String(),
|
||||
EnvVar: "PHOTOPRISM_JPEG_QUALITY",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "jpeg-size",
|
||||
Usage: "maximum size of created JPEG sidecar files in `PIXELS` (720-30000)",
|
||||
Value: 7680,
|
||||
EnvVar: "PHOTOPRISM_JPEG_SIZE",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "face-size",
|
||||
Usage: "minimum face size in `PIXELS` (20-10000)",
|
||||
Usage: "minimum size of faces in `PIXELS` (20-10000)",
|
||||
Value: face.SizeThreshold,
|
||||
EnvVar: "PHOTOPRISM_FACE_SIZE",
|
||||
},
|
||||
|
|
|
@ -109,11 +109,11 @@ type Options struct {
|
|||
PreviewToken string `yaml:"PreviewToken" json:"-" flag:"preview-token"`
|
||||
ThumbColor string `yaml:"ThumbColor" json:"ThumbColor" flag:"thumb-color"`
|
||||
ThumbFilter string `yaml:"ThumbFilter" json:"ThumbFilter" flag:"thumb-filter"`
|
||||
ThumbUncached bool `yaml:"ThumbUncached" json:"ThumbUncached" flag:"thumb-uncached"`
|
||||
ThumbSize int `yaml:"ThumbSize" json:"ThumbSize" flag:"thumb-size"`
|
||||
ThumbSizeUncached int `yaml:"ThumbSizeUncached" json:"ThumbSizeUncached" flag:"thumb-size-uncached"`
|
||||
JpegSize int `yaml:"JpegSize" json:"JpegSize" flag:"jpeg-size"`
|
||||
ThumbUncached bool `yaml:"ThumbUncached" json:"ThumbUncached" flag:"thumb-uncached"`
|
||||
JpegQuality string `yaml:"JpegQuality" json:"JpegQuality" flag:"jpeg-quality"`
|
||||
JpegSize int `yaml:"JpegSize" json:"JpegSize" flag:"jpeg-size"`
|
||||
FaceSize int `yaml:"-" json:"-" flag:"face-size"`
|
||||
FaceScore float64 `yaml:"-" json:"-" flag:"face-score"`
|
||||
FaceOverlap int `yaml:"-" json:"-" flag:"face-overlap"`
|
||||
|
|
Loading…
Reference in a new issue