CLI: Add short names for common command parameters/flags #2195
This commit is contained in:
parent
9e640a7dc8
commit
72d6af6674
2 changed files with 11 additions and 5 deletions
|
@ -41,6 +41,12 @@ const appDescription = "For installation instructions, visit https://docs.photop
|
|||
const appCopyright = "(c) 2018-2022 Michael Mayer <hello@photoprism.app>"
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}()
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "PhotoPrism"
|
||||
app.HelpName = filepath.Base(os.Args[0])
|
||||
|
|
|
@ -81,7 +81,7 @@ var GlobalFlags = []cli.Flag{
|
|||
EnvVar: "PHOTOPRISM_CONFIG_PATH",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "originals-path",
|
||||
Name: "originals-path, o",
|
||||
Usage: "storage `PATH` of your original media files (photos and videos)",
|
||||
EnvVar: "PHOTOPRISM_ORIGINALS_PATH",
|
||||
},
|
||||
|
@ -92,7 +92,7 @@ var GlobalFlags = []cli.Flag{
|
|||
EnvVar: "PHOTOPRISM_ORIGINALS_LIMIT",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "storage-path",
|
||||
Name: "storage-path, t",
|
||||
Usage: "writable storage `PATH` for cache, database, and sidecar files",
|
||||
EnvVar: "PHOTOPRISM_STORAGE_PATH",
|
||||
},
|
||||
|
@ -117,12 +117,12 @@ var GlobalFlags = []cli.Flag{
|
|||
EnvVar: "PHOTOPRISM_TEMP_PATH",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "backup-path",
|
||||
Name: "backup-path, b",
|
||||
Usage: "custom backup `PATH` for index backup files (optional)",
|
||||
EnvVar: "PHOTOPRISM_BACKUP_PATH",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "assets-path",
|
||||
Name: "assets-path, a",
|
||||
Usage: "assets `PATH` containing static resources like icons, models, and translations",
|
||||
EnvVar: "PHOTOPRISM_ASSETS_PATH",
|
||||
},
|
||||
|
@ -133,7 +133,7 @@ var GlobalFlags = []cli.Flag{
|
|||
Value: cpuid.CPU.PhysicalCores / 2,
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "wakeup-interval",
|
||||
Name: "wakeup-interval, i",
|
||||
Usage: "metadata, share & sync background worker wakeup interval in `SECONDS` (1-604800)",
|
||||
Value: DefaultWakeupIntervalSeconds,
|
||||
EnvVar: "PHOTOPRISM_WAKEUP_INTERVAL",
|
||||
|
|
Loading…
Reference in a new issue