asciinema

package module
v2.0.0-...-9eb79f6 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

README

WIP

asciinema V2

This is not a complete project This repo is a fork of the asciinema repo under the golang branch. It has been refactored a bit so that it can be used as a lib. As the originating branch is quite old, this lib will be behind some of the latest features and improvements that has been made to asciinema overall.

Implemented
  • Record
  • Play

The for was made to use with a local project, and all PR's are welcome.

Usage

Install
go get -u github.com/securisec/asciinema # for v1 asciinema format
go get -u github.com/securisec/asciinema/v2 # for v2 asciinema format
package main

import "github.com/securisec/asciinema"

func main() {
    cli := asciinema.New()
    cast, err := cli.Rec()
    ...
}

Documentation

Index

Constants

View Source
const Version = "1.2.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Title   string
	MaxWait float64
	Yes     bool
	Quite   bool
}

Options options to pass to various commands. These are common flags passed to the asciinema cli.

func New

func New(opts ...Options) *Options

New creates a new Options instance.

func (*Options) Play

func (o *Options) Play(cast *asciicast.Asciicast) error

Play plays the given asciicast. Use asciicast.Asciicast to unmarshal read from the asciicast file.

func (*Options) Rec

func (o *Options) Rec() (*asciicast.Asciicast, *bytes.Buffer, error)

Rec records the terminal and returns the asciicast and error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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