Documentation
¶
Index ¶
- func WithClearAfter() typeOption
- func WithSleepAfter(seconds int) typeOption
- type Config
- type Recorder
- func (e *Recorder) Clear() string
- func (e *Recorder) CreateTape(ctx context.Context, tape Tape, outputDir string) error
- func (e *Recorder) Press(key string, numTimes int) string
- func (e *Recorder) Sleep(seconds int) string
- func (e *Recorder) SpamPress(key string, numTimes int) string
- func (e *Recorder) Type(cmd string, options ...typeOption) string
- type Tape
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClearAfter ¶
func WithClearAfter() typeOption
WithClearAfter clears the terminal after executing a command.
func WithSleepAfter ¶
func WithSleepAfter(seconds int) typeOption
WithSleepAfter adds a sleep delay after executing a command.
Types ¶
type Config ¶
Config defines the visual settings for a tape recording.
func DefaultTapeConfig ¶
func DefaultTapeConfig() *Config
DefaultTapeConfig returns a TapeConfig with default dimensions and font size.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder manages VHS tape recordings and GIF generation.
func NewTapeRecorder ¶
NewTapeRecorder creates a new Recorder for the given VHS and CLI binaries.
func (*Recorder) CreateTape ¶
CreateTape generates a GIF from a Tape and saves it to outputDir.
func (*Recorder) Press ¶
Press generates VHS commands to press a key a specified number of times. Will sleep 50 milliseconds between each press.
Click to show internal directories.
Click to hide internal directories.