asciinema-player

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: MIT

README

asciinema-player

Go Report Card GoDoc

asciinema-player is a library and cli-app to play terminal sessions recorded by asciinema (http://github.com/asciinema/asciinema)

Prerequisites

  • Golang >= 1.10 or Vgo

Installation

Library:

go get -v -u github.com/xakep666/pkg/asciicast

App:

go get -v -u github.com/xakep666/cmd/asciinema-player

Usage

App
$ ./asciinema-player --help
  Usage of ./asciinema-player:
    -f string
          path to asciinema v2 file
    -maxWait duration
          maximum time between frames (default 2s)
    -speed float
          speed adjustment: <1 - increase, >1 - decrease (default 1)

For example you can play test session ./asciinema-player -f test.cast

asciicast

Library
    parsed, err := parser.Parse(file)
	if err != nil {
	    return err
	}

	tp, err := asciicast.NewTerminalPlayer()
	if err != nil {
        return err
    }

	err = tp.Play(parsed, maxWait, speed)
	if err != nil {
        return err
    }

Library usage example is app actually.

License

Asciinema-player project is licensed under the terms of the MIT license. Please see LICENSE in this repository for more details.

Directories

Path Synopsis
cmd
example
webplayer Module
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳