Raxol.Recording.Session (Raxol v2.3.0)

View Source

Data structure for a recorded terminal session.

Contains metadata (dimensions, timestamps, environment) and a list of timestamped output and input events captured during recording.

Summary

Functions

Returns the total duration in seconds.

Returns event count.

Creates a new session with current terminal dimensions.

Types

event()

@type event() ::
  {elapsed_us :: non_neg_integer(), type :: :output | :input, data :: binary()}

t()

@type t() :: %Raxol.Recording.Session{
  command: String.t() | nil,
  ended_at: DateTime.t() | nil,
  env: map(),
  events: [event()],
  height: pos_integer(),
  idle_time_limit: number() | nil,
  started_at: DateTime.t(),
  theme: map() | nil,
  title: String.t() | nil,
  width: pos_integer()
}

Functions

duration(session)

@spec duration(t()) :: float()

Returns the total duration in seconds.

event_count(session)

@spec event_count(t()) :: non_neg_integer()

Returns event count.

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a new session with current terminal dimensions.