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
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
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
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
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
WithTMDB looks up the movies, and TV episodes, which videos are, on TMDB, with its API key
func WithTracer ¶ added in v0.5.0
WithTracer traces the enrichment of each file, and go-metadata's handlers