defmodule Casebot.CSV do @doc""" Returns a list of strings representing the CSV file. Each list """ def rows(path\\ "persist.csv") do path |> File.read!() #|> String.trim() |> NimbleCSV.RFC4180.parse_string(skip_headers: false) |> Enum.map(fn row -> row |> Enum.map(&String.trim/1) |> Enum.map(&:binary.copy/1) |> List.to_tuple() end) end def init_master_data(filepath) do raw_data = CSV.rows(filepath) end end