logo

clairvoyance

Unnamed repository; edit this file 'description' to name the repository. git clone https://anongit.hacktivis.me/git/clairvoyance.git/

scan.ex (370B)


  1. defmodule Mix.Tasks.Scan do
  2. use Mix.Task
  3. def run(_) do
  4. Application.ensure_all_started(:clairvoyance)
  5. settings = Application.get_env(:clairvoyance, Clairvoyance.Log)
  6. result =
  7. Clairvoyance.scan()
  8. |> Jason.encode!()
  9. File.write(
  10. Keyword.get(settings, :path),
  11. result <> "\n",
  12. Keyword.get(settings, :modes)
  13. )
  14. end
  15. end