~ihabunek/triglav

ref: 248d445efaf6ff9a19f9fc8c8ed4359a87aeb85b triglav/lib/mix/tasks/triglav/import_osm.ex -rw-r--r-- 394 bytes
248d445eIvan Habunek Data status page 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
defmodule Mix.Tasks.Triglav.ImportOsm do
  use Mix.Task

  @shortdoc "Imports the latest OSM data for Croatia from Geofabrik"

  @impl Mix.Task
  def run(args) do
    Application.put_env(:triglav, :minimal, true)
    {:ok, _} = Application.ensure_all_started(:triglav)

    {opts, _rest} = OptionParser.parse!(args, strict: [force: :boolean])
    Triglav.Import.Osm.run(opts[:force])
  end
end