TTYPlayer is a player that playback terminal session.
Before use ttyplayer, you should install ttyrec, and record your tty session using ttyrec.
For Mac OSX users, ttyrec can be installed with homebrew:
brew install ttyrec
Use ttyrec
command to record terminal session:
ttyrec your.rec
Use exit command to finish.
exit
Include ttyplayer.min.css and ttyplayer.min.js in your page, then create a player:
new TTYPlayer({
parent: document.getElement('player-parent')
}).load('/your.rec')
Now we get one:
Read my blog and the markdown source code to know how to generate ttyplayer in markdown.
The default cols and rows are 80 and 20. Before you record, make sure your terminal size is cols 80 and rows 20.
Or give a custom size:
new TTYPlayer({
parent: document.getElement('player-parent'),
cols: 90,
rows: 30
}).load('/your.rec')
https://meowtec.github.io/ttyplayer.js/
Starts or pull requests welcome.