metadata

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 12 Imported by: 0

README

metadata package

This is for the metadata panel, fetching and rendering metadata. Since metadata fetching is not fully contained, some part of functionality is offloaded to main model

To-dos

  • Add unit tests
  • Finish required TODOs
  • Update coverage stats

Coverage

cd /path/to/ui/metadata
go test -cover

Current coverage is 0%

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

func GetMetadata

func GetMetadata(filePath string, metadataFocussed bool, et *exiftool.Exiftool) Metadata

func NewMetadata

func NewMetadata(data [][2]string, filepath string, infoMsg string) Metadata

func (Metadata) GetData

func (m Metadata) GetData() [][2]string

func (Metadata) GetPath

func (m Metadata) GetPath() string

func (Metadata) GetValue

func (m Metadata) GetValue(key string) (string, error)

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New() Model

func (*Model) IsBlank

func (m *Model) IsBlank() bool

func (*Model) ListDown

func (m *Model) ListDown()

Control metadata panel down

func (*Model) ListUp

func (m *Model) ListUp()

Control metadata panel up

func (*Model) MetadataLen

func (m *Model) MetadataLen() int

func (*Model) Render

func (m *Model) Render(metadataFocussed bool) string

func (*Model) ResetRender

func (m *Model) ResetRender()

func (*Model) ResetRenderIfInvalid

func (m *Model) ResetRenderIfInvalid()

func (*Model) SetBlank

func (m *Model) SetBlank()

func (*Model) SetDimensions

func (m *Model) SetDimensions(width int, height int)

Should be at least 2x2 TODO : Validate this

func (*Model) SetInfoMsg

func (m *Model) SetInfoMsg(msg string)

func (*Model) SetMetadata

func (m *Model) SetMetadata(metadata Metadata)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL