2018-09-24 09:53:16 +02:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2018-10-31 07:14:33 +01:00
|
|
|
|
2018-09-24 09:53:16 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/photoprism"
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
var ConfigCommand = cli.Command{
|
|
|
|
Name: "config",
|
|
|
|
Usage: "Displays global configuration values",
|
|
|
|
Action: configAction,
|
|
|
|
}
|
|
|
|
|
2018-10-31 02:42:54 +01:00
|
|
|
// Prints current configuration; called by ConfigCommand
|
2018-09-24 09:53:16 +02:00
|
|
|
func configAction(context *cli.Context) error {
|
|
|
|
conf := photoprism.NewConfig(context)
|
|
|
|
|
|
|
|
fmt.Printf("NAME VALUE\n")
|
|
|
|
fmt.Printf("debug %t\n", conf.Debug)
|
|
|
|
fmt.Printf("config-file %s\n", conf.ConfigFile)
|
|
|
|
fmt.Printf("assets-path %s\n", conf.AssetsPath)
|
|
|
|
fmt.Printf("originals-path %s\n", conf.OriginalsPath)
|
|
|
|
fmt.Printf("thumbnails-path %s\n", conf.ThumbnailsPath)
|
|
|
|
fmt.Printf("import-path %s\n", conf.ImportPath)
|
|
|
|
fmt.Printf("export-path %s\n", conf.ExportPath)
|
|
|
|
fmt.Printf("darktable-cli %s\n", conf.DarktableCli)
|
|
|
|
fmt.Printf("database-driver %s\n", conf.DatabaseDriver)
|
|
|
|
fmt.Printf("database-dsn %s\n", conf.DatabaseDsn)
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|