scan.ex (370B)
- defmodule Mix.Tasks.Scan do
- use Mix.Task
- def run(_) do
- Application.ensure_all_started(:clairvoyance)
- settings = Application.get_env(:clairvoyance, Clairvoyance.Log)
- result =
- Clairvoyance.scan()
- |> Jason.encode!()
- File.write(
- Keyword.get(settings, :path),
- result <> "\n",
- Keyword.get(settings, :modes)
- )
- end
- end