photoprism/internal/commands/show_formats.go
Michael Mayer 68ba289d6c CLI: Add "photoprism show config/formats" subcommands
Replaces "photoprism config", which could only display
current configuration values. Codecs and file formats
have been refactored along the way.

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2022-04-12 13:28:28 +02:00

22 lines
462 B
Go

package commands
import (
"fmt"
"github.com/photoprism/photoprism/pkg/fs"
"github.com/urfave/cli"
)
var ShowFormatsCommand = cli.Command{
Name: "formats",
Usage: "Displays supported media and sidecar file formats",
Action: showFormatsAction,
}
// showFormatsAction lists supported media and sidecar file formats.
func showFormatsAction(ctx *cli.Context) error {
formats := fs.Extensions.Formats(true).Markdown()
fmt.Println(formats)
return nil
}