metadata

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 31 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package metadata is the task which enriches the files of a volume which is indexed with index=metadata, with their metadata, of go-metadata: tags of audio and video, EXIF of photos, the titles of documents, movies and TV episodes on TMDB, recordings on AcoustID, and so on. Which files are read depends on the build: without cgo, those of go-metadata's handlers which are pure Go, and with it, audio, video, and photos' EXIF, HEIF and RAW, too, which need FFmpeg 8, libexif, libheif and LibRaw.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata added in v0.5.0

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

Metadata enriches files with their metadata, of go-metadata

func New added in v0.5.0

func New(opts ...Opt) (*Metadata, error)

New returns the task which enriches files with their metadata, with the options, of which the server's command line is

func (*Metadata) Enrich added in v0.5.0

func (self *Metadata) Enrich(ctx context.Context, backend gofiler.Filer, store indexer.MetadataStore, object *schema.Object) (err error)

Enrich reads the file of the backend, and stores its metadata, of go-metadata, in the store, which replaces what was found of it before. A file whose type no handler reads has the metadata of its name, such as its title. It's an indexer.Task, of indexer.WithMetadataTask.

func (*Metadata) Markdown added in v0.5.0

func (self *Metadata) Markdown(ctx context.Context, r io.Reader, file *schema.Object) (_ *schema.Markdown, err error)

Markdown reads the file's content as Markdown, of go-metadata, such as a PDF's, or a Word document's, and returns its start, at most markdownPart of it, and where the rest starts, when there's more. A file which can't be read as Markdown is ErrNotImplemented.

type Opt added in v0.5.0

type Opt func(*opt) error

Opt is an option of the enrichment of files with their metadata

func WithAcoustID added in v0.5.0

func WithAcoustID(key string) Opt

WithAcoustID looks up the recordings which audio is, on AcoustID, with its API key, of the AcoustID identifiers of their tags, or, built with cgo and the chromaprint tag, of their fingerprints

func WithClientOpts added in v0.5.0

func WithClientOpts(opts ...client.ClientOpt) Opt

WithClientOpts sets the options of the clients of TMDB, and AcoustID, such as a user agent, or a tracer, which are set before them

func WithMaxSize added in v0.5.0

func WithMaxSize(size int64) Opt

WithMaxSize sets the most of a file which is read, in bytes, or zero for no limit, which is the default

func WithTMDB added in v0.5.0

func WithTMDB(key string) Opt

WithTMDB looks up the movies, and TV episodes, which videos are, on TMDB, with its API key

func WithTracer added in v0.5.0

func WithTracer(tracer trace.Tracer) Opt

WithTracer traces the enrichment of each file, and go-metadata's handlers

Directories

Path Synopsis
Package cmd is the flags of the metadata enrichment of a server, which it embeds, and composes into the registry of its volumes
Package cmd is the flags of the metadata enrichment of a server, which it embeds, and composes into the registry of its volumes

Jump to

Keyboard shortcuts

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