Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mclarkson committed Jun 23, 2020
0 parents commit 96ee06b
Show file tree
Hide file tree
Showing 4 changed files with 779 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
VERSION = 0.0.1

.PHONY: all
all: tags

.PHONY: install
install: all
install cmdline-player /usr/local/bin/cmdline-player

.PHONY: uninstall
uninstall:
rm -f /usr/local/bin/cmdline-player

.PHONY: clean
clean:
rm tags

tags: cmdline-player
ctags --language-force=sh cmdline-player

# vim:noet:ts=2:sw=2
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Command Line Player

The `cmdline-player` script plays back files ending in `.scr` and starts a recording with `byzanz-record`. GIF output is created by default but byzanz supports other formats.

Example: `cmdline-player kthw-2.scr` - will start a playback and recording session. The animated GIF file will be saved as `screencast.gif`.

To record a in a different format supported by byzanz-record, change the 'EXT' variable at the top of 'cmdline-player'. Byzanz supports gif, ogg or webm.

With the '-c' option this script will also create the Markdown format files and transcripts, and move the video to an 'images' directory.

All screencasts in my-own-kind were created with the `cmdline-player`.

## Usage

```none
$ cmdline-player -h
cmdline-player - play commands from a .scr file.\n'
Usage: cmdline-player [ -hq ] | [ [-wn] FILE ]
FILE - The name of the file containing screencast and shell commands.
-h
--help - This help text.
-w
--window "NAME" - Specify the NAME of the window to record.
-n
--norecord - Don't record the playback.
-q
--query - Retrieve the name of a window by clicking on it.
-c
--create-mds "NAME" - Create a markdown file named NAME from the screencast
file. NAME can contain the full path and file name.
Paths not starting with '/' are relative to the
current working directory. A transcript file is
also created in the same directory. The video is
moved to a directory named 'images' in the current
directory.
Examples:
Choose a window to record and start playing back all of KTHW:
$ # In the terminal to be recorded:
$ while true; do screen -r -e ^Oo screencast; sleep .5; done
$ # In the controller terminal:
$ cd kubernetes-the-hard-way-in-containers/kthw-docker/
$ wname=$(cmdline-player -q)
$ for i in {2..14}; do cmdline-player -w "$wname" -c kthw/kthw-$i.md screencasts/kthw-$i.scr <<<"\n"; sleep 1; done
Create a single screencast recording:
$ cmdline-player install-mokctl-linux.scr
```
Loading

0 comments on commit 96ee06b

Please sign in to comment.