module Latch::RunCommand

Overview

Helper module for running command-line tools. Include this in extractors or processors that need to shell out to CLI tools.

struct ColourspaceFromIdentify
  include Latch::Extractor
  include Latch::RunCommand

  def extract(uploaded_file, metadata, **options) : String?
    run_command("magick", ["identify", "-format", "%[colorspace]"], uploaded_file)
  end
end

Direct including types

Defined in:

latch/run_command.cr