2019-05-06 23:18:10 +02:00
|
|
|
package config
|
2018-09-24 09:53:16 +02:00
|
|
|
|
2019-06-20 01:11:03 +02:00
|
|
|
import (
|
2021-01-09 12:18:59 +01:00
|
|
|
"github.com/klauspost/cpuid/v2"
|
2019-06-20 01:11:03 +02:00
|
|
|
"github.com/urfave/cli"
|
2021-09-23 13:16:05 +02:00
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/face"
|
2019-06-20 01:11:03 +02:00
|
|
|
)
|
2018-09-24 09:53:16 +02:00
|
|
|
|
2021-09-05 12:32:08 +02:00
|
|
|
// GlobalFlags describes global command-line parameters and flags.
|
2018-09-24 09:53:16 +02:00
|
|
|
var GlobalFlags = []cli.Flag{
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "debug",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable debug mode, shows additional log messages",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DEBUG",
|
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "log-level, l",
|
|
|
|
Usage: "log verbosity `LEVEL` (trace, debug, info, warning, error, fatal or panic)",
|
|
|
|
Value: "info",
|
|
|
|
EnvVar: "PHOTOPRISM_LOG_LEVEL",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "log-filename",
|
|
|
|
Usage: "optional server log `FILENAME`",
|
|
|
|
EnvVar: "PHOTOPRISM_LOG_FILENAME",
|
|
|
|
Value: "",
|
|
|
|
},
|
2021-02-06 17:04:00 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "test",
|
|
|
|
Hidden: true,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable test mode",
|
2021-02-06 17:04:00 +01:00
|
|
|
},
|
2020-12-18 10:59:21 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "demo",
|
|
|
|
Hidden: true,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable demo mode",
|
2020-12-18 10:59:21 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DEMO",
|
|
|
|
},
|
2021-01-15 18:30:26 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "sponsor",
|
|
|
|
Hidden: true,
|
2021-01-19 21:28:16 +01:00
|
|
|
Usage: "your continuous support helps to pay for development and operating expenses",
|
2021-01-15 18:30:26 +01:00
|
|
|
EnvVar: "PHOTOPRISM_SPONSOR",
|
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "public, p",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable password authentication",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_PUBLIC",
|
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "admin-password",
|
|
|
|
Usage: "initial admin `PASSWORD`, min 4 characters",
|
|
|
|
EnvVar: "PHOTOPRISM_ADMIN_PASSWORD",
|
|
|
|
},
|
2019-05-04 09:11:33 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "read-only, r",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable import, upload, and delete",
|
2020-05-29 09:23:26 +02:00
|
|
|
EnvVar: "PHOTOPRISM_READONLY",
|
2019-05-04 09:11:33 +02:00
|
|
|
},
|
2019-12-30 12:38:11 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "experimental, e",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable experimental features",
|
2019-12-30 12:38:11 +01:00
|
|
|
EnvVar: "PHOTOPRISM_EXPERIMENTAL",
|
|
|
|
},
|
2020-12-17 18:24:55 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "config-file, c",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "load config options from `FILENAME`",
|
2020-12-17 18:24:55 +01:00
|
|
|
EnvVar: "PHOTOPRISM_CONFIG_FILE",
|
|
|
|
},
|
2020-12-21 15:00:18 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "config-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "config `PATH` where settings and other config files can be found",
|
2020-12-21 15:00:18 +01:00
|
|
|
EnvVar: "PHOTOPRISM_CONFIG_PATH",
|
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.StringFlag{
|
2020-12-18 09:11:42 +01:00
|
|
|
Name: "originals-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "photo and video library `PATH` containing your original files",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_ORIGINALS_PATH",
|
2020-05-31 02:09:52 +02:00
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "originals-limit",
|
|
|
|
Value: 1000,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "original file size limit in `MB`",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_ORIGINALS_LIMIT",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "import-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "optional import `PATH` from which files can be added to originals",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_IMPORT_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "storage-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "writable storage `PATH` for cache, database, and sidecar files",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_STORAGE_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "sidecar-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "optional custom relative or absolute sidecar `PATH`",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_SIDECAR_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "cache-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "optional custom cache `PATH` for sessions and thumbnail files",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_CACHE_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "temp-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "optional custom temporary file `PATH`",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_TEMP_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "backup-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "optional custom backup file `PATH`",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_BACKUP_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "assets-path",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "static assets `PATH` containing resources like icons and templates",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_ASSETS_PATH",
|
2020-12-17 18:24:55 +01:00
|
|
|
},
|
2020-01-06 23:43:19 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "workers, w",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max `NUMBER` of indexing workers",
|
2020-01-06 23:43:19 +01:00
|
|
|
EnvVar: "PHOTOPRISM_WORKERS",
|
2021-01-09 12:18:59 +01:00
|
|
|
Value: cpuid.CPU.PhysicalCores / 2,
|
2020-01-06 23:43:19 +01:00
|
|
|
},
|
2020-04-06 22:09:45 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "wakeup-interval",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "background worker wakeup interval in `SECONDS`",
|
2021-10-05 18:42:39 +02:00
|
|
|
Value: DefaultWakeupInterval,
|
2020-04-06 22:09:45 +02:00
|
|
|
EnvVar: "PHOTOPRISM_WAKEUP_INTERVAL",
|
|
|
|
},
|
2021-01-02 18:56:15 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "auto-index",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "WebDAV auto indexing safety delay in `SECONDS` (-1 to disable)",
|
2021-10-05 18:42:39 +02:00
|
|
|
Value: DefaultAutoIndexDelay,
|
2021-01-02 18:56:15 +01:00
|
|
|
EnvVar: "PHOTOPRISM_AUTO_INDEX",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "auto-import",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "WebDAV auto import safety delay in `SECONDS` (-1 to disable)",
|
2021-10-05 18:42:39 +02:00
|
|
|
Value: DefaultAutoImportDelay,
|
2021-01-02 18:56:15 +01:00
|
|
|
EnvVar: "PHOTOPRISM_AUTO_IMPORT",
|
|
|
|
},
|
2020-12-18 10:59:21 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-webdav",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable built-in WebDAV server",
|
2020-12-18 10:59:21 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_WEBDAV",
|
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-backups",
|
|
|
|
Usage: "disable creating YAML metadata backup sidecar files",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_BACKUPS",
|
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-settings",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable settings UI and API",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_SETTINGS",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-places",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable reverse geocoding and maps",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_PLACES",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-exiftool",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable metadata extraction with ExifTool",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_EXIFTOOL",
|
|
|
|
},
|
2021-08-05 15:15:33 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-ffmpeg",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable video transcoding and thumbnail generation with FFmpeg",
|
2021-08-05 15:15:33 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_FFMPEG",
|
|
|
|
},
|
2021-04-30 14:24:01 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-darktable",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable RAW file conversion with Darktable",
|
2021-04-30 14:24:01 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_DARKTABLE",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-rawtherapee",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable RAW file conversion with RawTherapee",
|
2021-04-30 14:24:01 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_RAWTHERAPEE",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-sips",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable RAW file conversion with Sips on macOS",
|
2021-04-30 14:24:01 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_SIPS",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-heifconvert",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable HEIC/HEIF file conversion",
|
2021-04-30 14:24:01 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_HEIFCONVERT",
|
|
|
|
},
|
2021-09-24 03:00:37 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-tensorflow",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable all features depending on TensorFlow",
|
2021-09-24 03:00:37 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_TENSORFLOW",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-faces",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable facial recognition",
|
2021-09-24 03:00:37 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_FACES",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-classification",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable image classification",
|
2021-09-24 03:00:37 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_CLASSIFICATION",
|
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "detect-nsfw",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "flag photos as private that may be offensive (requires TensorFlow)",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DETECT_NSFW",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "upload-nsfw",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "allow uploads that may be offensive",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_UPLOAD_NSFW",
|
|
|
|
},
|
2021-07-05 16:41:43 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "cdn-url",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "optional content delivery network `URL` (optional)",
|
2021-07-05 16:41:43 +02:00
|
|
|
EnvVar: "PHOTOPRISM_CDN_URL",
|
|
|
|
},
|
2019-12-11 14:10:20 +01:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-url",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "public site `URL`",
|
2019-12-11 14:10:20 +01:00
|
|
|
Value: "http://localhost:2342/",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_URL",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
2020-06-26 14:26:36 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "site-preview",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "public preview image `URL`",
|
2020-06-26 14:26:36 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_PREVIEW",
|
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "site-author",
|
|
|
|
Usage: "artist name or copyright",
|
|
|
|
EnvVar: "PHOTOPRISM_SITE_AUTHOR",
|
|
|
|
},
|
2019-12-11 14:10:20 +01:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-title",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "site title",
|
2019-12-11 14:10:20 +01:00
|
|
|
Value: "PhotoPrism",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_TITLE",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-caption",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "site caption",
|
2020-06-25 18:39:48 +02:00
|
|
|
Value: "Browse Your Life",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_CAPTION",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-description",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "site description",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_DESCRIPTION",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "http-port",
|
|
|
|
Value: 2342,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "http server port `NUMBER`",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_PORT",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
2019-05-04 13:29:32 +02:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "http-host",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "http server `IP` address",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_HOST",
|
2019-05-04 13:29:32 +02:00
|
|
|
},
|
2019-06-30 05:38:39 +02:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "http-mode, m",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "http server `MODE` (debug, release, or test)",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_MODE",
|
2019-06-30 05:38:39 +02:00
|
|
|
},
|
2021-01-10 15:28:42 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "http-compression, z",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable http compression to improve bandwidth utilization (none or gzip)",
|
2021-01-10 15:28:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_COMPRESSION",
|
|
|
|
},
|
2019-06-30 05:38:39 +02:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "database-driver",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database `DRIVER` (sqlite or mysql)",
|
2020-05-31 02:09:52 +02:00
|
|
|
Value: "sqlite",
|
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_DRIVER",
|
2019-06-30 05:38:39 +02:00
|
|
|
},
|
2018-09-24 09:53:16 +02:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "database-dsn",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "sqlite file name, specifying a `DSN` is optional other drivers",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_DSN",
|
|
|
|
},
|
2020-12-11 12:46:28 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "database-server",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database server `HOST` and port e.g. mysql:3306",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_SERVER",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "database-name",
|
|
|
|
Value: "photoprism",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database schema `NAME`",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_NAME",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "database-user",
|
|
|
|
Value: "photoprism",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database user `NAME`",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_USER",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "database-password",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database user `PASSWORD`",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_PASSWORD",
|
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "database-conns",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max `NUMBER` of open database connections",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_CONNS",
|
|
|
|
},
|
2020-07-13 10:41:45 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "database-conns-idle",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max `NUMBER` of idle database connections",
|
2020-07-13 10:41:45 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_CONNS_IDLE",
|
|
|
|
},
|
2021-05-01 10:25:34 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "raw-presets",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable RAW file converter presets (may reduce performance)",
|
2021-05-01 10:25:34 +02:00
|
|
|
EnvVar: "PHOTOPRISM_RAW_PRESETS",
|
2020-08-12 13:16:25 +02:00
|
|
|
},
|
2019-06-06 14:44:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "Darktable CLI `COMMAND` for RAW file conversion",
|
2019-06-06 14:44:29 +02:00
|
|
|
Value: "darktable-cli",
|
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_BIN",
|
|
|
|
},
|
2021-09-21 15:33:46 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-blacklist",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable using Darktable for specific file `EXTENSIONS`",
|
2021-09-24 07:44:36 +02:00
|
|
|
Value: "raf,cr3,dng",
|
2021-09-21 15:33:46 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_BLACKLIST",
|
|
|
|
},
|
2021-05-01 10:25:34 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "rawtherapee-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "RawTherapee CLI `COMMAND` for RAW file conversion",
|
2021-05-01 10:25:34 +02:00
|
|
|
Value: "rawtherapee-cli",
|
|
|
|
EnvVar: "PHOTOPRISM_RAWTHERAPEE_BIN",
|
2020-07-13 15:23:54 +02:00
|
|
|
},
|
2021-09-21 15:33:46 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "rawtherapee-blacklist",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable using RawTherapee for specific file `EXTENSIONS`",
|
2021-09-21 15:33:46 +02:00
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_RAWTHERAPEE_BLACKLIST",
|
|
|
|
},
|
2020-07-13 15:23:54 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "sips-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "Sips `COMMAND` for RAW file conversion on macOS",
|
2020-07-13 15:23:54 +02:00
|
|
|
Value: "sips",
|
|
|
|
EnvVar: "PHOTOPRISM_SIPS_BIN",
|
2020-07-12 16:36:39 +02:00
|
|
|
},
|
2020-05-11 18:29:17 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "heifconvert-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "HEIC/HEIF image convert `COMMAND`",
|
2020-05-11 18:29:17 +02:00
|
|
|
Value: "heif-convert",
|
|
|
|
EnvVar: "PHOTOPRISM_HEIFCONVERT_BIN",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-13 15:36:42 +02:00
|
|
|
Name: "ffmpeg-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "FFmpeg `COMMAND` for video transcoding and cover images",
|
2020-05-13 15:36:42 +02:00
|
|
|
Value: "ffmpeg",
|
2020-05-11 18:29:17 +02:00
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_BIN",
|
|
|
|
},
|
2021-02-11 20:22:00 +01:00
|
|
|
cli.StringFlag{
|
2021-02-16 11:40:40 +01:00
|
|
|
Name: "ffmpeg-encoder",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "FFmpeg AVC encoder `NAME`",
|
2021-02-11 20:22:00 +01:00
|
|
|
Value: "libx264",
|
2021-02-16 11:40:40 +01:00
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_ENCODER",
|
2021-02-11 20:22:00 +01:00
|
|
|
},
|
2021-02-17 18:19:52 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "ffmpeg-bitrate",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max FFmpeg encoding `BITRATE` (Mbit/s)",
|
2021-02-17 18:19:52 +01:00
|
|
|
Value: 50,
|
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_BITRATE",
|
|
|
|
},
|
2021-02-16 08:57:21 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "ffmpeg-buffers",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "`NUMBER` of FFmpeg capture buffers",
|
2021-02-16 08:57:21 +01:00
|
|
|
Value: 32,
|
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_BUFFERS",
|
|
|
|
},
|
2019-06-06 14:44:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "exiftool-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "ExifTool `COMMAND` for extracting metadata",
|
2019-06-06 14:44:29 +02:00
|
|
|
Value: "exiftool",
|
|
|
|
EnvVar: "PHOTOPRISM_EXIFTOOL_BIN",
|
|
|
|
},
|
2020-05-27 19:38:40 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "download-token",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "custom download url `TOKEN`",
|
2020-05-27 19:38:40 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DOWNLOAD_TOKEN",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-27 19:56:56 +02:00
|
|
|
Name: "preview-token",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "custom thumbnail and video streaming url `TOKEN`",
|
2020-05-27 19:56:56 +02:00
|
|
|
EnvVar: "PHOTOPRISM_PREVIEW_TOKEN",
|
2020-05-27 19:38:40 +02:00
|
|
|
},
|
2020-01-13 11:07:09 +01:00
|
|
|
cli.StringFlag{
|
2021-09-05 13:48:53 +02:00
|
|
|
Name: "thumb-filter",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "thumbnail downscaling `FILTER` (best to worst: blackman, lanczos, cubic, linear)",
|
2020-01-31 16:28:52 +01:00
|
|
|
Value: "lanczos",
|
2020-05-05 17:17:19 +02:00
|
|
|
EnvVar: "PHOTOPRISM_THUMB_FILTER",
|
2020-05-05 15:42:54 +02:00
|
|
|
},
|
2020-05-05 17:04:13 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "thumb-size, s",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max pre-cached thumbnail size in `PIXELS` (720-7680)",
|
2020-05-05 17:04:13 +02:00
|
|
|
Value: 2048,
|
|
|
|
EnvVar: "PHOTOPRISM_THUMB_SIZE",
|
|
|
|
},
|
2020-12-21 15:00:18 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "thumb-uncached, u",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable on-demand thumbnail generation (high memory and cpu usage)",
|
2020-12-21 15:00:18 +01:00
|
|
|
EnvVar: "PHOTOPRISM_THUMB_UNCACHED",
|
|
|
|
},
|
2020-05-05 17:04:13 +02:00
|
|
|
cli.IntFlag{
|
2020-07-13 15:23:54 +02:00
|
|
|
Name: "thumb-size-uncached, x",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max on-demand thumbnail size in `PIXELS` (720-7680)",
|
2020-07-15 08:30:28 +02:00
|
|
|
Value: 7680,
|
2020-07-13 15:23:54 +02:00
|
|
|
EnvVar: "PHOTOPRISM_THUMB_SIZE_UNCACHED",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
2020-07-14 14:30:19 +02:00
|
|
|
Name: "jpeg-size",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "max size of generated JPEG files in `PIXELS` (720-30000)",
|
2020-07-15 08:30:28 +02:00
|
|
|
Value: 7680,
|
2020-07-14 14:30:19 +02:00
|
|
|
EnvVar: "PHOTOPRISM_JPEG_SIZE",
|
2020-01-13 11:07:09 +01:00
|
|
|
},
|
2020-05-19 11:00:17 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "jpeg-quality, q",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "`QUALITY` of generated JPEG files, a higher value reduces compression (25-100)",
|
2020-08-12 13:16:25 +02:00
|
|
|
Value: 92,
|
2020-05-19 11:00:17 +02:00
|
|
|
EnvVar: "PHOTOPRISM_JPEG_QUALITY",
|
|
|
|
},
|
2021-09-23 13:47:18 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-size",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "min face size in `PIXELS`",
|
2021-10-05 10:12:48 +02:00
|
|
|
Value: face.SizeThreshold,
|
2021-09-23 13:47:18 +02:00
|
|
|
EnvVar: "PHOTOPRISM_FACE_SIZE",
|
|
|
|
},
|
2021-09-23 13:16:05 +02:00
|
|
|
cli.Float64Flag{
|
|
|
|
Name: "face-score",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "quality `THRESHOLD` for faces",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.ScoreThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_SCORE",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-overlap",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "face area overlap threshold in `PERCENT`",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.OverlapThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_OVERLAP",
|
|
|
|
},
|
2021-10-05 10:12:48 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-cluster-size",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "min size of faces forming a cluster in `PIXELS`",
|
2021-10-05 10:12:48 +02:00
|
|
|
Value: face.ClusterSizeThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_SIZE",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-cluster-score",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "quality `THRESHOLD` for faces forming a cluster",
|
2021-10-05 10:12:48 +02:00
|
|
|
Value: face.ClusterScoreThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_SCORE",
|
|
|
|
},
|
2021-09-23 13:16:05 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-cluster-core",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "`NUMBER` of faces forming a cluster core",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.ClusterCore,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_CORE",
|
|
|
|
},
|
|
|
|
cli.Float64Flag{
|
|
|
|
Name: "face-cluster-dist",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "similarity distance of faces forming a cluster core",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.ClusterDist,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_DIST",
|
|
|
|
},
|
|
|
|
cli.Float64Flag{
|
|
|
|
Name: "face-match-dist",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "similarity offset for matching faces with existing clusters",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.MatchDist,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_MATCH_DIST",
|
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "pid-filename",
|
|
|
|
Usage: "daemon process id `FILENAME`",
|
|
|
|
EnvVar: "PHOTOPRISM_PID_FILENAME",
|
|
|
|
},
|
2018-09-24 09:53:16 +02:00
|
|
|
}
|