Documentation
¶
Overview ¶
Package record is what the course's recorders share. scripts/tapes and scripts/episodes both serve the demo API on the port the lessons show, run a lesson's own commands as setup in a scratch directory, and hand vhs an environment with nothing of the recording machine's in the picture; one copy of each keeps the two recordings alike.
Index ¶
Constants ¶
const Port = 8089
Port is the port the lessons show in their URLs; a recording's picture carries it, so it is not negotiable the way learncheck's is.
Variables ¶
This section is empty.
Functions ¶
func Environment ¶
Environment is what a recording's setup and vhs run under: the fresh apic in bin first on PATH, a HOME of its own under work, UTC and a UTF-8 locale, and nothing of the recording machine's that would show in the picture: no NO_COLOR, no proxy (`apic env` reports the one it sees) and no APIC_ variable, since an exported APIC_VAR_baseUrl or APIC_VAR_user would override the demo project's values in every shot.
func Pick ¶
Pick keeps the items named in only, comma-separated, in the order given; an empty only keeps them all, and a name that matches nothing is an error, since a typo would otherwise record nothing and say so late.
Types ¶
type Step ¶
type Step struct {
Sh string
Lesson string // the page's number prefix, "09"
Blocks []int
Replace [2]string
}
Step is one piece of a recording's setup: a shell snippet, or runnable blocks of a lesson page (1-based, in page order), optionally with a text substitution applied to them first.
func (Step) Code ¶
Code is the shell the step runs: its snippet, or the lesson blocks it names (from blocks, the lesson's runnable blocks in page order), with the substitution applied. A substitution that matches none of the blocks is an error, since the step would silently run the unchanged lesson commands.