From 10841b11cb1c9258bf53b9063926bc5a4a98ff95 Mon Sep 17 00:00:00 2001 From: dstroch Date: Fri, 7 Apr 2023 20:01:00 +0200 Subject: [PATCH] Move parser to a new file because of new rules set for naming structure --- lib/onigumo/downloader.ex | 15 --------------- lib/onigumo/parser.ex | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 lib/onigumo/parser.ex diff --git a/lib/onigumo/downloader.ex b/lib/onigumo/downloader.ex index 7b88e6b..a581049 100644 --- a/lib/onigumo/downloader.ex +++ b/lib/onigumo/downloader.ex @@ -57,18 +57,3 @@ defmodule Onigumo.Downloader do Application.get_env(:onigumo, :http_client) end end - -defmodule Onigumo.Parser do - @moduledoc """ - Web scraper - """ - - def main(root_path) do - root_path - |> File.ls!() - |> Enum.reject(&File.dir?(&1)) - |> Enum.reject(&String.contains?(&1, ".")) - |> Enum.join("\n") - |> IO.puts() - end -end diff --git a/lib/onigumo/parser.ex b/lib/onigumo/parser.ex new file mode 100644 index 0000000..82ebd6d --- /dev/null +++ b/lib/onigumo/parser.ex @@ -0,0 +1,14 @@ +defmodule Onigumo.Parser do + @moduledoc """ + Web scraper + """ + + def main(root_path) do + root_path + |> File.ls!() + |> Enum.reject(&File.dir?(&1)) + |> Enum.reject(&String.contains?(&1, ".")) + |> Enum.join("\n") + |> IO.puts() + end +end