scriptreplayer

command module
v0.0.0-...-79cc3d4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2018 License: BSD-2-Clause Imports: 11 Imported by: 0

README

scriptreplayer

This is a hack to be able to leverage the output of the Unix "script" and "scriptreplay" commands in a web browser. It is inspired by https://github.com/ysangkok/terminal_web_player which was then inspired by others...

Usage

    scriptreplayer [OPTIONS] [TIMING_FILE] [SCRIPT_LOG] TEMPLATE 
    scriptreplayer -t demo.timing -s demo.log page.tmpl > demo.html

Approach

For a script session saved as "demo.timing" and "demo.log"

  1. Merge demo.timing and demo.log into a JSON object (e.g. demo.json), save to be rendered into the page
  2. Generate Go templated page (or default template) into HTML markup, embedded JavaScript and JSON playback object

If this works, merge code into mkpage project.

Getting xterm.js

Requires
  • node
  • npm
    sudo apt install node npm
    npm install xterm
Building
    go build scriptreplayer.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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