diff --git a/internal/commands/auth_reset.go b/internal/commands/auth_reset.go index 694fb4d34..9efdc806a 100644 --- a/internal/commands/auth_reset.go +++ b/internal/commands/auth_reset.go @@ -21,12 +21,12 @@ var AuthResetCommand = &cli.Command{ &cli.BoolFlag{ Name: "trace", Aliases: []string{"t"}, - Usage: "show trace logs for debugging", + Usage: "shows trace logs for debugging", }, &cli.BoolFlag{ Name: "yes", Aliases: []string{"y"}, - Usage: "assume \"yes\" and run non-interactively", + Usage: "runs the command non-interactively", }, }, Action: authResetAction, diff --git a/internal/commands/backup.go b/internal/commands/backup.go index ec014adca..2a4bce8cd 100644 --- a/internal/commands/backup.go +++ b/internal/commands/backup.go @@ -33,12 +33,12 @@ var backupFlags = []cli.Flag{ &cli.BoolFlag{ Name: "force", Aliases: []string{"f"}, - Usage: "replace the index database backup file, if it exists", + Usage: "replaces the index database backup file, if it exists", }, &cli.BoolFlag{ Name: "albums", Aliases: []string{"a"}, - Usage: "create YAML files to back up album metadata (in the standard backup path if no other path is specified)", + Usage: "creates YAML files to back up album metadata (in the standard backup path if no other path is specified)", }, &cli.PathFlag{ Name: "albums-path", @@ -48,7 +48,7 @@ var backupFlags = []cli.Flag{ &cli.BoolFlag{ Name: "database", Aliases: []string{"index", "i"}, - Usage: "create index database backup (in the backup path with the date as filename if no filename is passed, or sent to stdout if - is passed as filename)", + Usage: "creates an index database backup (in the backup path with the date as filename if no filename is passed, or sent to stdout if - is passed as filename)", }, &cli.PathFlag{ Name: "database-path", diff --git a/internal/commands/cleanup.go b/internal/commands/cleanup.go index 1b58595c8..a2f1d6a61 100644 --- a/internal/commands/cleanup.go +++ b/internal/commands/cleanup.go @@ -22,7 +22,7 @@ var CleanUpCommand = &cli.Command{ var cleanUpFlags = []cli.Flag{ &cli.BoolFlag{ Name: "dry", - Usage: "dry run, don't actually remove anything", + Usage: "performs a dry run that doesn't actually remove anything", }, } diff --git a/internal/commands/clients_remove.go b/internal/commands/clients_remove.go index 2ae7817e2..ea80518ca 100644 --- a/internal/commands/clients_remove.go +++ b/internal/commands/clients_remove.go @@ -20,7 +20,7 @@ var ClientsRemoveCommand = &cli.Command{ &cli.BoolFlag{ Name: "force", Aliases: []string{"f"}, - Usage: "don't ask for confirmation", + Usage: "skips asking for confirmation", }, }, Action: clientsRemoveAction, diff --git a/internal/commands/clients_reset.go b/internal/commands/clients_reset.go index 268c48e9a..4d745e1d0 100644 --- a/internal/commands/clients_reset.go +++ b/internal/commands/clients_reset.go @@ -17,12 +17,12 @@ var ClientsResetCommand = &cli.Command{ &cli.BoolFlag{ Name: "trace", Aliases: []string{"t"}, - Usage: "show trace logs for debugging", + Usage: "shows trace logs for debugging", }, &cli.BoolFlag{ Name: "yes", Aliases: []string{"y"}, - Usage: "assume \"yes\" and run non-interactively", + Usage: "runs the command non-interactively", }, }, Action: clientsResetAction, diff --git a/internal/commands/faces.go b/internal/commands/faces.go index 5d64e99a3..fe3690c83 100644 --- a/internal/commands/faces.go +++ b/internal/commands/faces.go @@ -47,7 +47,7 @@ var FacesCommands = &cli.Command{ &cli.BoolFlag{ Name: "force", Aliases: []string{"f"}, - Usage: "remove all people and faces", + Usage: "removes all people and faces", }, }, Action: facesResetAction, diff --git a/internal/commands/index.go b/internal/commands/index.go index 1b6962778..882937b5e 100644 --- a/internal/commands/index.go +++ b/internal/commands/index.go @@ -38,7 +38,7 @@ var indexFlags = []cli.Flag{ &cli.BoolFlag{ Name: "cleanup", Aliases: []string{"c"}, - Usage: "remove orphan index entries and thumbnails", + Usage: "removes orphan index entries and thumbnails", }, } diff --git a/internal/commands/migrations.go b/internal/commands/migrations.go index a04096507..56c12b066 100644 --- a/internal/commands/migrations.go +++ b/internal/commands/migrations.go @@ -39,7 +39,7 @@ var MigrationsRunCommand = &cli.Command{ &cli.BoolFlag{ Name: "trace", Aliases: []string{"t"}, - Usage: "show trace logs for debugging", + Usage: "shows trace logs for debugging", }, }, Action: migrationsRunAction, diff --git a/internal/commands/passwd.go b/internal/commands/passwd.go index 01048b402..0ec942b9b 100644 --- a/internal/commands/passwd.go +++ b/internal/commands/passwd.go @@ -27,12 +27,12 @@ var PasswdCommand = &cli.Command{ &cli.BoolFlag{ Name: "show", Aliases: []string{"s"}, - Usage: "show bcrypt hash of new password", + Usage: "shows bcrypt hash of new password", }, &cli.BoolFlag{ Name: "remove", Aliases: []string{"rm"}, - Usage: "remove password to disable local authentication", + Usage: "removes password to disable local authentication", }, }, Action: passwdAction, diff --git a/internal/commands/places.go b/internal/commands/places.go index 6f852c163..d7e0a92a5 100644 --- a/internal/commands/places.go +++ b/internal/commands/places.go @@ -30,7 +30,7 @@ var PlacesCommands = &cli.Command{ &cli.BoolFlag{ Name: "yes", Aliases: []string{"y"}, - Usage: "assume \"yes\" and run non-interactively", + Usage: "runs the command non-interactively", }, }, Action: placesUpdateAction, diff --git a/internal/commands/purge.go b/internal/commands/purge.go index 8e3d82d62..4662843e9 100644 --- a/internal/commands/purge.go +++ b/internal/commands/purge.go @@ -26,11 +26,11 @@ var PurgeCommand = &cli.Command{ var purgeFlags = []cli.Flag{ &cli.BoolFlag{ Name: "hard", - Usage: "permanently remove from index", + Usage: "permanently removes data from the index", }, &cli.BoolFlag{ Name: "dry", - Usage: "dry run, don't actually remove anything", + Usage: "performs a dry run that doesn't actually remove anything", }, } diff --git a/internal/commands/reset.go b/internal/commands/reset.go index 6e740ef72..5be7f44de 100644 --- a/internal/commands/reset.go +++ b/internal/commands/reset.go @@ -25,17 +25,17 @@ var ResetCommand = &cli.Command{ &cli.BoolFlag{ Name: "index", Aliases: []string{"i"}, - Usage: "reset index database only", + Usage: "resets only the index database ", }, &cli.BoolFlag{ Name: "trace", Aliases: []string{"t"}, - Usage: "show trace logs for debugging", + Usage: "shows trace logs for debugging", }, &cli.BoolFlag{ Name: "yes", Aliases: []string{"y"}, - Usage: "assume \"yes\" and run non-interactively", + Usage: "runs the command non-interactively", }, }, Action: resetAction, diff --git a/internal/commands/users.go b/internal/commands/users.go index 06b51a546..8bfbea00b 100644 --- a/internal/commands/users.go +++ b/internal/commands/users.go @@ -15,10 +15,10 @@ const ( UserRoleUsage = "user account `ROLE` (admin or guest)" UserAuthUsage = "authentication `PROVIDER` (default, local, oidc or none)" UserAuthIDUsage = "authentication `ID` e.g. Subject ID or Distinguished Name (DN)" - UserAdminUsage = "make user super admin with full access" - UserNoLoginUsage = "disable login on the web interface" - UserWebDAVUsage = "allow to sync files via WebDAV" - UserDisable2FA = "deactivate two-factor authentication" + UserAdminUsage = "makes user super admin with full access" + UserNoLoginUsage = "disables login on the web interface" + UserWebDAVUsage = "allows to sync files via WebDAV" + UserDisable2FA = "deactivates two-factor authentication" ) // UsersCommands configures the user management subcommands. @@ -98,19 +98,19 @@ var UserTokensFlag = &cli.BoolFlag{ var UsersLoginFlag = &cli.BoolFlag{ Name: "login", Aliases: []string{"l"}, - Usage: "show date and time of last login", + Usage: "shows date and time of last login", } // UsersCreatedFlag is a CLI flag for showing the account creation timestamp in reports. var UsersCreatedFlag = &cli.BoolFlag{ Name: "created", Aliases: []string{"a"}, - Usage: "show account creation timestamp", + Usage: "shows account creation timestamp", } // UsersDeletedFlag is a CLI flag for showing deleted user accounts in reports. var UsersDeletedFlag = &cli.BoolFlag{ Name: "deleted", Aliases: []string{"r"}, - Usage: "show deleted user accounts", + Usage: "shows deleted user accounts", } diff --git a/internal/commands/users_remove.go b/internal/commands/users_remove.go index 04425cba3..ff62e1998 100644 --- a/internal/commands/users_remove.go +++ b/internal/commands/users_remove.go @@ -21,7 +21,7 @@ var UsersRemoveCommand = &cli.Command{ &cli.BoolFlag{ Name: "force", Aliases: []string{"f"}, - Usage: "don't ask for confirmation", + Usage: "skips asking for confirmation", }, }, Action: usersRemoveAction, diff --git a/internal/commands/users_reset.go b/internal/commands/users_reset.go index 646240bca..67b3c56b7 100644 --- a/internal/commands/users_reset.go +++ b/internal/commands/users_reset.go @@ -20,12 +20,12 @@ var UsersResetCommand = &cli.Command{ &cli.BoolFlag{ Name: "trace", Aliases: []string{"t"}, - Usage: "show trace logs for debugging", + Usage: "shows trace logs for debugging", }, &cli.BoolFlag{ Name: "yes", Aliases: []string{"y"}, - Usage: "assume \"yes\" and run non-interactively", + Usage: "runs the command non-interactively", }, }, Action: usersResetAction, diff --git a/internal/config/cli_flags_test.go b/internal/config/cli_flags_test.go index b0cfbc673..957681eb9 100644 --- a/internal/config/cli_flags_test.go +++ b/internal/config/cli_flags_test.go @@ -30,14 +30,14 @@ func TestCliFlags_Replace(t *testing.T) { Name: "public", Aliases: []string{"p"}, Hidden: true, - Usage: "disable authentication, advanced settings, and WebDAV remote access", + Usage: "disables authentication, advanced settings, and WebDAV remote access", EnvVars: EnvVars("PUBLIC"), }} newPublicFlag := CliFlag{Flag: &cli.BoolFlag{ Name: "public", Hidden: false, - Usage: "disable authentication, advanced settings, and WebDAV remote access", + Usage: "disables authentication, advanced settings, and WebDAV remote access", EnvVars: EnvVars("PUBLIC"), }} @@ -114,7 +114,7 @@ func TestCliFlags_Insert(t *testing.T) { Name: "public", Aliases: []string{"p"}, Hidden: true, - Usage: "disable authentication, advanced settings, and WebDAV remote access", + Usage: "disables authentication, advanced settings, and WebDAV remote access", EnvVars: EnvVars("PUBLIC"), }} @@ -163,7 +163,7 @@ func TestCliFlags_InsertBefore(t *testing.T) { Name: "public", Aliases: []string{"p"}, Hidden: true, - Usage: "disable authentication, advanced settings, and WebDAV remote access", + Usage: "disables authentication, advanced settings, and WebDAV remote access", EnvVars: EnvVars("PUBLIC"), }} @@ -214,7 +214,7 @@ func TestCliFlags_Prepend(t *testing.T) { Name: "public", Aliases: []string{"p"}, Hidden: true, - Usage: "disable authentication, advanced settings, and WebDAV remote access", + Usage: "disables authentication, advanced settings, and WebDAV remote access", EnvVars: EnvVars("PUBLIC"), }} diff --git a/internal/config/flags.go b/internal/config/flags.go index d8ed81c51..bafd3c8e7 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -35,7 +35,7 @@ var Flags = CliFlags{ Name: "public", Aliases: []string{"p"}, Hidden: true, - Usage: "disable authentication, advanced settings, and WebDAV remote access", + Usage: "disables authentication, advanced settings, and WebDAV remote access", EnvVars: EnvVars("PUBLIC"), }}, { Flag: &cli.StringFlag{ @@ -95,12 +95,12 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "oidc-redirect", - Usage: "automatically redirect unauthenticated users to the configured identity provider", + Usage: "automatically redirects unauthenticated users to the configured identity provider", EnvVars: EnvVars("OIDC_REDIRECT"), }}, { Flag: &cli.BoolFlag{ Name: "oidc-register", - Usage: "allow new users to create an account when they sign in with OpenID Connect", + Usage: "allows new users to create an account when they sign in with OpenID Connect", EnvVars: EnvVars("OIDC_REGISTER"), }}, { Flag: &cli.StringFlag{ @@ -111,12 +111,12 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "oidc-webdav", - Usage: "allow new OpenID Connect users to use WebDAV when they have a role that allows it", + Usage: "allows new OpenID Connect users to use WebDAV when they have a role that allows it", EnvVars: EnvVars("OIDC_WEBDAV"), }}, { Flag: &cli.BoolFlag{ Name: "disable-oidc", - Usage: "disable single sign-on via OpenID Connect, even if an identity provider has been configured", + Usage: "disables single sign-on via OpenID Connect, even if an identity provider has been configured", EnvVars: EnvVars("DISABLE_OIDC"), }}, { Flag: &cli.Int64Flag{ @@ -146,34 +146,34 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "prod", - Usage: "disable debug mode and log startup warnings and errors only", + Usage: "disables debug mode and only logs startup warnings and errors", EnvVars: EnvVars("PROD"), }}, { Flag: &cli.BoolFlag{ Name: "debug", - Usage: "enable debug mode for development and troubleshooting", + Usage: "enables debug mode for development and troubleshooting", EnvVars: EnvVars("DEBUG"), }}, { Flag: &cli.BoolFlag{ Name: "trace", - Usage: "enable trace mode to display all debug and trace logs", + Usage: "enables trace mode to display all debug and trace logs", EnvVars: EnvVars("TRACE"), }}, { Flag: &cli.BoolFlag{ Name: "test", Hidden: true, - Usage: "enable test mode", + Usage: "enables test mode", }}, { Flag: &cli.BoolFlag{ Name: "unsafe", Hidden: true, - Usage: "disable safety checks", + Usage: "disables safety checks", EnvVars: EnvVars("UNSAFE"), }}, { Flag: &cli.BoolFlag{ Name: "demo", Hidden: true, - Usage: "enable demo mode", + Usage: "enables demo mode", EnvVars: EnvVars("DEMO"), }}, { Flag: &cli.BoolFlag{ @@ -198,7 +198,7 @@ var Flags = CliFlags{ Flag: &cli.StringFlag{ Name: "defaults-yaml", Aliases: []string{"y"}, - Usage: "load default config values from `FILENAME` if it exists, does not override CLI flags or environment variables", + Usage: "loads default config values from `FILENAME` if it exists, does not override CLI flags or environment variables", Value: "/etc/photoprism/defaults.yml", EnvVars: EnvVars("DEFAULTS_YAML"), TakesFile: true, @@ -252,23 +252,23 @@ var Flags = CliFlags{ }}, { Flag: &cli.StringFlag{ Name: "import-allow", - Usage: "restrict imports to these file types (comma-separated list of `EXTENSIONS`; leave blank to allow all)", + Usage: "restricts imports to these file types (comma-separated list of `EXTENSIONS`; leave blank to allow all)", EnvVars: EnvVars("IMPORT_ALLOW"), }}, { Flag: &cli.BoolFlag{ Name: "upload-nsfw", Aliases: []string{"n"}, - Usage: "allow uploads that might be offensive (detecting unsafe content requires TensorFlow)", + Usage: "allows uploads that might be offensive (detecting unsafe content requires TensorFlow)", EnvVars: EnvVars("UPLOAD_NSFW"), }}, { Flag: &cli.StringFlag{ Name: "upload-allow", - Usage: "restrict uploads to these file types (comma-separated list of `EXTENSIONS`; leave blank to allow all)", + Usage: "restricts uploads to these file types (comma-separated list of `EXTENSIONS`; leave blank to allow all)", EnvVars: EnvVars("UPLOAD_ALLOW"), }}, { Flag: &cli.BoolFlag{ Name: "upload-archives", - Usage: "allow upload of zip archives (will be extracted before import)", + Usage: "allows upload of zip archives (will be extracted before import)", EnvVars: EnvVars("UPLOAD_ARCHIVES"), }}, { Flag: &cli.IntFlag{ @@ -312,12 +312,12 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "sidecar-yaml", - Usage: "create YAML sidecar files to back up picture metadata", + Usage: "creates YAML sidecar files to back up picture metadata", EnvVars: EnvVars("SIDECAR_YAML"), }, DocDefault: "true"}, { Flag: &cli.BoolFlag{ Name: "usage-info", - Usage: "display usage information in the user interface", + Usage: "displays storage usage information in the user interface", EnvVars: EnvVars("USAGE_INFO"), }}, { Flag: &cli.Uint64Flag{ @@ -346,12 +346,12 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "backup-database", - Usage: "create regular backups based on the configured schedule", + Usage: "creates regular backups based on the configured schedule", EnvVars: EnvVars("BACKUP_DATABASE"), }, DocDefault: "true"}, { Flag: &cli.BoolFlag{ Name: "backup-albums", - Usage: "create YAML files to back up album metadata", + Usage: "creates YAML files to back up album metadata", EnvVars: EnvVars("BACKUP_ALBUMS"), }, DocDefault: "true"}, { Flag: &cli.IntFlag{ @@ -389,118 +389,118 @@ var Flags = CliFlags{ Flag: &cli.BoolFlag{ Name: "read-only", Aliases: []string{"r"}, - Usage: "disable features that require write permission for the originals folder", + Usage: "disables features that require write permission for the originals folder", EnvVars: EnvVars("READONLY"), }}, { Flag: &cli.BoolFlag{ Name: "experimental", Aliases: []string{"e"}, - Usage: "enable new features that may be incomplete or unstable", + Usage: "enables new features that may be incomplete or unstable", EnvVars: EnvVars("EXPERIMENTAL"), }}, { Flag: &cli.BoolFlag{ Name: "disable-frontend", - Usage: "disable the web user interface so that only the service API endpoints are accessible", + Usage: "disables the web user interface so that only the service API endpoints are accessible", EnvVars: EnvVars("DISABLE_FRONTEND"), }}, { Flag: &cli.BoolFlag{ Name: "disable-settings", - Usage: "disable the settings frontend and related API endpoints, e.g. in combination with public mode", + Usage: "disables the settings frontend and related API endpoints, e.g. in combination with public mode", EnvVars: EnvVars("DISABLE_SETTINGS"), }}, { Flag: &cli.BoolFlag{ Name: "disable-backups", - Usage: "prevent database and album backups as well as YAML sidecar files from being created", + Usage: "prevents database and album backups as well as YAML sidecar files from being created", EnvVars: EnvVars("DISABLE_BACKUPS"), }}, { Flag: &cli.BoolFlag{ Name: "disable-restart", - Usage: "prevent admins from restarting the server through the user interface", + Usage: "prevents admins from restarting the server through the user interface", EnvVars: EnvVars("DISABLE_RESTART"), }}, { Flag: &cli.BoolFlag{ Name: "disable-webdav", - Usage: "prevent other apps from accessing PhotoPrism as a shared network drive", + Usage: "prevents other apps from accessing PhotoPrism as a shared network drive", EnvVars: EnvVars("DISABLE_WEBDAV"), }}, { Flag: &cli.BoolFlag{ Name: "disable-places", - Usage: "disable interactive world maps and reverse geocoding", + Usage: "disables interactive world maps and reverse geocoding", EnvVars: EnvVars("DISABLE_PLACES"), }}, { Flag: &cli.BoolFlag{ Name: "disable-tensorflow", - Usage: "disable features depending on TensorFlow, e.g. image classification and face recognition", + Usage: "disables features depending on TensorFlow, e.g. image classification and face recognition", EnvVars: EnvVars("DISABLE_TENSORFLOW"), }}, { Flag: &cli.BoolFlag{ Name: "disable-faces", - Usage: "disable face detection and recognition (requires TensorFlow)", + Usage: "disables face detection and recognition (requires TensorFlow)", EnvVars: EnvVars("DISABLE_FACES"), }}, { Flag: &cli.BoolFlag{ Name: "disable-classification", - Usage: "disable image classification (requires TensorFlow)", + Usage: "disables image classification (requires TensorFlow)", EnvVars: EnvVars("DISABLE_CLASSIFICATION"), }}, { Flag: &cli.BoolFlag{ Name: "disable-ffmpeg", - Usage: "disable video transcoding and thumbnail extraction with FFmpeg", + Usage: "disables video transcoding and thumbnail extraction with FFmpeg", EnvVars: EnvVars("DISABLE_FFMPEG"), }}, { Flag: &cli.BoolFlag{ Name: "disable-exiftool", - Usage: "disable metadata extraction with ExifTool (required for full Video, Live Photo, and XMP support)", + Usage: "disables metadata extraction with ExifTool (required for full Video, Live Photo, and XMP support)", EnvVars: EnvVars("DISABLE_EXIFTOOL"), }}, { Flag: &cli.BoolFlag{ Name: "disable-vips", - Usage: "disable image processing and conversion with libvips", + Usage: "disables image processing and conversion with libvips", EnvVars: EnvVars("DISABLE_VIPS"), }}, { Flag: &cli.BoolFlag{ Name: "disable-sips", - Usage: "disable file conversion using the sips command under macOS", + Usage: "disables file conversion using the sips command under macOS", EnvVars: EnvVars("DISABLE_SIPS"), }}, { Flag: &cli.BoolFlag{ Name: "disable-darktable", - Usage: "disable conversion of RAW images with Darktable", + Usage: "disables conversion of RAW images with Darktable", EnvVars: EnvVars("DISABLE_DARKTABLE"), }}, { Flag: &cli.BoolFlag{ Name: "disable-rawtherapee", - Usage: "disable conversion of RAW images with RawTherapee", + Usage: "disables conversion of RAW images with RawTherapee", EnvVars: EnvVars("DISABLE_RAWTHERAPEE"), }}, { Flag: &cli.BoolFlag{ Name: "disable-imagemagick", - Usage: "disable conversion of image files with ImageMagick", + Usage: "disables conversion of image files with ImageMagick", EnvVars: EnvVars("DISABLE_IMAGEMAGICK"), }}, { Flag: &cli.BoolFlag{ Name: "disable-heifconvert", - Usage: "disable conversion of HEIC images with libheif", + Usage: "disables conversion of HEIC images with libheif", EnvVars: EnvVars("DISABLE_HEIFCONVERT"), }}, { Flag: &cli.BoolFlag{ Name: "disable-jpegxl", - Usage: "disable JPEG XL file format support", + Usage: "disables JPEG XL file format support", EnvVars: EnvVars("DISABLE_JPEGXL"), }}, { Flag: &cli.BoolFlag{ Name: "disable-raw", - Usage: "disable indexing and conversion of RAW images", + Usage: "disables indexing and conversion of RAW images", EnvVars: EnvVars("DISABLE_RAW"), }}, { Flag: &cli.BoolFlag{ Name: "raw-presets", - Usage: "enables applying user presets when converting RAW images (reduces performance)", + Usage: "enables custom user presets when converting RAW images (reduces performance)", EnvVars: EnvVars("RAW_PRESETS"), }}, { Flag: &cli.BoolFlag{ Name: "exif-bruteforce", - Usage: "always perform a brute-force search if no Exif headers were found", + Usage: "performs a brute-force search if no Exif headers were found", EnvVars: EnvVars("EXIF_BRUTEFORCE"), }}, { Flag: &cli.StringFlag{ @@ -630,7 +630,7 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "cdn-video", - Usage: "stream videos over the specified CDN", + Usage: "streams videos over the specified CDN", EnvVars: EnvVars("CDN_VIDEO"), }}, { Flag: &cli.StringFlag{ @@ -651,6 +651,26 @@ var Flags = CliFlags{ EnvVars: EnvVars("CORS_METHODS"), Value: header.DefaultAccessControlAllowMethods, }}, { + Flag: &cli.StringFlag{ + Name: "portal-url", + Usage: "PhotoPrism® Portal server `URL`", + EnvVars: EnvVars("PORTAL_URL"), + }}, { + Flag: &cli.StringFlag{ + Name: "portal-client", + Usage: "PhotoPrism® Portal client `ID`", + EnvVars: EnvVars("PORTAL_CLIENT"), + }}, { + Flag: &cli.StringFlag{ + Name: "portal-secret", + Usage: "PhotoPrism® Portal client `SECRET`", + EnvVars: EnvVars("PORTAL_SECRET"), + }}, { + Flag: &cli.StringFlag{ + Name: "instance-secret", + Usage: "unique `SECRET` for authenticating this instance", + EnvVars: EnvVars("INSTANCE_SECRET"), + }}, { Flag: &cli.StringFlag{ Name: "https-proxy", Usage: "proxy server `URL` to be used for outgoing connections *optional*", @@ -658,7 +678,7 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "https-proxy-insecure", - Usage: "ignore invalid HTTPS certificates when using a proxy", + Usage: "ignores invalid HTTPS certificates when using a proxy", EnvVars: EnvVars("HTTPS_PROXY_INSECURE"), }}, { Flag: &cli.StringFlag{ @@ -693,12 +713,12 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "disable-tls", - Usage: "disable HTTPS/TLS even if the site URL starts with https:// and a certificate is available", + Usage: "disables HTTPS/TLS even if the site URL starts with https:// and a certificate is available", EnvVars: EnvVars("DISABLE_TLS"), }}, { Flag: &cli.BoolFlag{ Name: "default-tls", - Usage: "default to a self-signed HTTPS/TLS certificate if no other certificate is available", + Usage: "uses a self-signed HTTPS/TLS certificate if no other certificate is available", EnvVars: EnvVars("DEFAULT_TLS"), }}, { Flag: &cli.StringFlag{ @@ -731,7 +751,7 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "http-cache-public", - Usage: "allow static content to be cached by a CDN or caching proxy", + Usage: "allows static content to be cached by a CDN or caching proxy", EnvVars: EnvVars("HTTP_CACHE_PUBLIC"), }}, { Flag: &cli.IntFlag{ @@ -995,7 +1015,7 @@ var Flags = CliFlags{ Flag: &cli.BoolFlag{ Name: "thumb-uncached", Aliases: []string{"u"}, - Usage: "generate missing thumbnails on demand (high memory and cpu usage)", + Usage: "generates missing thumbnails on demand (high memory and cpu usage)", EnvVars: EnvVars("THUMB_UNCACHED"), }}, { Flag: &cli.StringFlag{ @@ -1026,24 +1046,24 @@ var Flags = CliFlags{ }}, { Flag: &cli.BoolFlag{ Name: "vision-api", - Usage: "enable computer vision service API endpoints under /api/v1/vision (requires authorized access token)", + Usage: "enables the computer vision API endpoints under /api/v1/vision (requires authorization)", EnvVars: EnvVars("VISION_API"), }}, { Flag: &cli.StringFlag{ Name: "vision-uri", - Usage: "remote computer vision service `URI`, e.g. https://example.com/api/v1/vision (leave blank to disable)", + Usage: "vision service base `URI`, e.g. https://example.com/api/v1/vision (leave blank to disable)", Value: "", EnvVars: EnvVars("VISION_URI"), }}, { Flag: &cli.StringFlag{ Name: "vision-key", - Usage: "remote computer vision service access `TOKEN` *optional*", + Usage: "vision service access `TOKEN` *optional*", Value: "", EnvVars: EnvVars("VISION_KEY"), }}, { Flag: &cli.BoolFlag{ Name: "detect-nsfw", - Usage: "flag newly added pictures as private if they might be offensive (requires TensorFlow)", + Usage: "flags newly added pictures as private if they might be offensive (requires TensorFlow)", EnvVars: EnvVars("DETECT_NSFW"), }}, { Flag: &cli.IntFlag{ diff --git a/internal/config/options.go b/internal/config/options.go index b61c09359..1a007cd60 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -140,6 +140,10 @@ type Options struct { CORSOrigin string `yaml:"CORSOrigin" json:"-" flag:"cors-origin"` CORSHeaders string `yaml:"CORSHeaders" json:"-" flag:"cors-headers"` CORSMethods string `yaml:"CORSMethods" json:"-" flag:"cors-methods"` + PortalUrl string `yaml:"PortalUrl" json:"-" flag:"portal-url"` + PortalClient string `yaml:"PortalClient" json:"-" flag:"portal-client"` + PortalSecret string `yaml:"PortalSecret" json:"-" flag:"portal-secret"` + InstanceSecret string `yaml:"InstanceSecret" json:"-" flag:"instance-secret"` HttpsProxy string `yaml:"HttpsProxy" json:"HttpsProxy" flag:"https-proxy"` HttpsProxyInsecure bool `yaml:"HttpsProxyInsecure" json:"HttpsProxyInsecure" flag:"https-proxy-insecure"` TrustedPlatform string `yaml:"TrustedPlatform" json:"-" flag:"trusted-platform"` diff --git a/internal/config/report.go b/internal/config/report.go index 055d9cbc2..442530cf5 100644 --- a/internal/config/report.go +++ b/internal/config/report.go @@ -168,6 +168,12 @@ func (c *Config) Report() (rows [][]string, cols []string) { {"cors-headers", c.CORSHeaders()}, {"cors-methods", c.CORSMethods()}, + // Portal Server. + {"portal-url", fmt.Sprintf("%s", c.Options().PortalUrl)}, + {"portal-client", fmt.Sprintf("%s", c.Options().PortalClient)}, + {"portal-secret", fmt.Sprintf("%s", strings.Repeat("*", utf8.RuneCountInString(c.Options().PortalSecret)))}, + {"instance-secret", fmt.Sprintf("%s", strings.Repeat("*", utf8.RuneCountInString(c.Options().InstanceSecret)))}, + // URIs. {"base-uri", c.BaseUri("/")}, {"api-uri", c.ApiUri()}, diff --git a/internal/config/report_sections.go b/internal/config/report_sections.go index 46844bb68..e2f824800 100644 --- a/internal/config/report_sections.go +++ b/internal/config/report_sections.go @@ -25,6 +25,7 @@ var OptionsReportSections = []ReportSection{ {Start: "PHOTOPRISM_READONLY", Title: "Feature Flags"}, {Start: "PHOTOPRISM_DEFAULT_LOCALE", Title: "Customization"}, {Start: "PHOTOPRISM_SITE_URL", Title: "Site Information"}, + {Start: "PHOTOPRISM_PORTAL_URL", Title: "Portal Server"}, {Start: "PHOTOPRISM_HTTPS_PROXY", Title: "Proxy Server"}, {Start: "PHOTOPRISM_DISABLE_TLS", Title: "Web Server"}, {Start: "PHOTOPRISM_DATABASE_DRIVER", Title: "Database Connection"}, @@ -51,6 +52,7 @@ var YamlReportSections = []ReportSection{ {Start: "ReadOnly", Title: "Feature Flags"}, {Start: "DefaultLocale", Title: "Customization"}, {Start: "SiteUrl", Title: "Site Information"}, + {Start: "PortalUrl", Title: "Portal Server"}, {Start: "HttpsProxy", Title: "Proxy Server"}, {Start: "DisableTLS", Title: "Web Server"}, {Start: "DatabaseDriver", Title: "Database Connection"},