Skip to content

Commit 96ee06b

Browse files
committed
first commit
0 parents  commit 96ee06b

File tree

4 files changed

+779
-0
lines changed

4 files changed

+779
-0
lines changed

Makefile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
VERSION = 0.0.1
2+
3+
.PHONY: all
4+
all: tags
5+
6+
.PHONY: install
7+
install: all
8+
install cmdline-player /usr/local/bin/cmdline-player
9+
10+
.PHONY: uninstall
11+
uninstall:
12+
rm -f /usr/local/bin/cmdline-player
13+
14+
.PHONY: clean
15+
clean:
16+
rm tags
17+
18+
tags: cmdline-player
19+
ctags --language-force=sh cmdline-player
20+
21+
# vim:noet:ts=2:sw=2

README.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Command Line Player
2+
3+
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.
4+
5+
Example: `cmdline-player kthw-2.scr` - will start a playback and recording session. The animated GIF file will be saved as `screencast.gif`.
6+
7+
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.
8+
9+
With the '-c' option this script will also create the Markdown format files and transcripts, and move the video to an 'images' directory.
10+
11+
All screencasts in my-own-kind were created with the `cmdline-player`.
12+
13+
## Usage
14+
15+
```none
16+
$ cmdline-player -h
17+
cmdline-player - play commands from a .scr file.\n'
18+
19+
Usage: cmdline-player [ -hq ] | [ [-wn] FILE ]
20+
21+
FILE - The name of the file containing screencast and shell commands.
22+
-h
23+
--help - This help text.
24+
-w
25+
--window "NAME" - Specify the NAME of the window to record.
26+
-n
27+
--norecord - Don't record the playback.
28+
-q
29+
--query - Retrieve the name of a window by clicking on it.
30+
-c
31+
--create-mds "NAME" - Create a markdown file named NAME from the screencast
32+
file. NAME can contain the full path and file name.
33+
Paths not starting with '/' are relative to the
34+
current working directory. A transcript file is
35+
also created in the same directory. The video is
36+
moved to a directory named 'images' in the current
37+
directory.
38+
39+
Examples:
40+
41+
Choose a window to record and start playing back all of KTHW:
42+
43+
$ # In the terminal to be recorded:
44+
$ while true; do screen -r -e ^Oo screencast; sleep .5; done
45+
$ # In the controller terminal:
46+
$ cd kubernetes-the-hard-way-in-containers/kthw-docker/
47+
$ wname=$(cmdline-player -q)
48+
$ for i in {2..14}; do cmdline-player -w "$wname" -c kthw/kthw-$i.md screencasts/kthw-$i.scr <<<"\n"; sleep 1; done
49+
50+
Create a single screencast recording:
51+
52+
$ cmdline-player install-mokctl-linux.scr
53+
54+
55+
```

0 commit comments

Comments
 (0)