tape

package
v0.2.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tape converts a btest.Session into a VHS .tape script.

VHS (github.com/charmbracelet/vhs) is a tool that renders terminal sessions as GIFs from a declarative tape script. This package bridges the blit .tuisess format to the VHS tape format so recorded sessions can be turned into shareable GIFs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(sess *btest.Session) string

Generate converts a btest.Session into a VHS tape script string.

The resulting script contains:

  • A preamble that sets the terminal size from the session metadata.
  • A Type, Key, Sleep, or Hide directive for every input step.
  • Screen steps are skipped (they are blit assertions, not VHS directives).

func GenerateWithOptions added in v0.2.12

func GenerateWithOptions(sess *btest.Session, opts Options) string

GenerateWithOptions converts a session into a VHS tape script with configurable options. The Speed option scales inter-step sleep durations.

Types

type Options added in v0.2.12

type Options struct {
	// Speed is the playback speed multiplier. Values > 1 produce shorter
	// sleeps (faster playback); values < 1 produce longer sleeps. Zero or
	// negative values are treated as 1.0.
	Speed float64
}

Options configures VHS tape generation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL