- Install
gsed
,gawk
andcore-utils
usingbrew
(Because the tools provided by Apple are not GNU). - Clone the
https://github.com/mboisson/recording-script
repository, and add it to your PATH.
To use :
recordsession.sh [email protected]:<user>/<repo>.git <filename> [delay]
For example, the above .html was recorded using the command
recordsession.sh [email protected]:mboisson/testing.git bash_lesson 10
- The script pushes from the
gh-pages
branch, and creates one if it does not exist. It has been used with Software Carpentry event pages. - The delay is in seconds, and there is a default delay of 60 seconds between each sync.
- This script assumes that your github is configured to use SSH keys.
- The script uses a modified version of
ansi2html.sh
, which can be obtained fromhttps://github.com/pixelb/scripts/commits/master/scripts/ansi2html.sh
OWM addendum:
For me to save keystrokes in a bash session:
- Make a repository on GitHub. This could be the SWC repository I'm teaching
from. E.g.
testScript
. - Make sure that the current directory is on the
PATH
:
export PATH=.:$PATH
- To save keystrokes for a bash session with a 10-second delay:
recordsession.sh [email protected]:cfgauss/testScript.git bash_lesson 10
- Type into shell as normal. The history will sync every 10 seconds.
- Have students reference the URL:
https://cfgauss.github.io/testScript/bash_lesson.html
Note that this page automatically refreshes as it syncs! Students don't have to manually refresh it within their browser.