defp strip(skiped), do: skiped
defp drop_empty(stream) do
stream
|> Stream.filter(fn
{:line, ""} -> false
_ -> true
end)
end
defp drop_absurdus(stream) do
stream
|> Stream.filter(fn
{:line, line} -> not is_absurdus(line)
_ -> true
end)
end
defp is_absurdus("* * * * *"), do: true
defp is_absurdus("* * * * *"), do: true
defp is_absurdus(_), do: false
defp remove_special({:line, line}) do
new_line =
line
|> String.replace("_", "")
|> String.replace(~r/\[\d+\]/, "")
{:line, new_line}
end
defp remove_special(skipped), do: skipped