Attached.Processors.MetadataExtractors (Attached v0.1.0)

Copy Markdown View Source

Registry and dispatch for original metadata extractors.

After an original is created, Attached.Originals.ExtractMetadataWorker runs the first accepting extractor and merges the result into original.metadata.

Each module wraps exactly one tool. Multiple modules can target the same content type — the dispatcher picks the first one whose binary (or NIF) is available.

Ships with:

Configuration

config :attached, metadata_extractors: [
  Attached.Processors.MetadataExtractors.Image.Vix,
  Attached.Processors.MetadataExtractors.Video.FFmpeg,
  Attached.Processors.MetadataExtractors.Audio.FFmpeg,
  MyApp.MetadataExtractors.Office
]

Summary

Functions

Returns the first extractor that accepts the given content type and whose runtime dependencies are available. nil if none match.

Returns all configured extractors (regardless of availability).

Functions

find_for(content_type)

Returns the first extractor that accepts the given content type and whose runtime dependencies are available. nil if none match.

list()

Returns all configured extractors (regardless of availability).