lib/mix/tasks/ttycast.info.ex
defmodule Mix.Tasks.Ttycast.Info do
@moduledoc """
Print recording metadata.
mix ttycast.info /tmp/demo.ttycast
"""
use Mix.Task
@shortdoc "Show .ttycast metadata"
@impl true
def run([path]) do
path
|> TTYCast.info()
|> inspect(pretty: true)
|> Mix.shell().info()
end
def run(_argv), do: Mix.raise("usage: mix ttycast.info PATH")
end