asciinema.org/lib/asciinema/png_generator.ex
2017-06-02 15:40:24 +02:00

12 lines
421 B
Elixir

defmodule Asciinema.PngGenerator do
alias Asciinema.Asciicast
alias Asciinema.PngGenerator.PngParams
@doc "Generates PNG image from asciicast and returns path to it"
@callback generate(asciicast :: %Asciicast{}, png_params :: %PngParams{}) :: {:ok, String.t} | {:error, term}
def generate(asciicast, png_params) do
Application.get_env(:asciinema, :png_generator).generate(asciicast, png_params)
end
end