This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aa_DJ.UTF-8 UTF-8 | |
| aa_DJ ISO-8859-1 | |
| aa_ER UTF-8 | |
| aa_ER@saaho UTF-8 | |
| aa_ET UTF-8 | |
| af_ZA.UTF-8 UTF-8 | |
| af_ZA ISO-8859-1 | |
| agr_PE UTF-8 | |
| ak_GH UTF-8 | |
| am_ET UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Test do | |
| @doc ~S""" | |
| iex> Test.download("http://www.six-swiss-exchange.com/data/market/statistics/corrections_2017-02-03.csv", "test.csv") | |
| """ | |
| def download(src, output_filename) do | |
| Logger.info "Downloading #{src} -> #{output_filename}" | |
| Task.async(getURL(src)) | |
| |> Task.await | |
| |> Task.async(&(fn -> File.write!(output_filename, &1) end)) |