{%- comment -%}
As discussed in /_posts/2017-01-03-pdp-11-tutorials.md, when a page (usually part of a tutorial)
wants to create a control that tests some feature of a machine, the page will define a machine command
using a Liquid-style include that looks like this:
{%- include machines/command.html type='button' label='Try It!' machine='vt100' component='Keyboard' command='sendString' value='Hello World' -%}
and which should generate something like this:
Alternatively, if the command parameter is the name of a machine script in the page's Front Matter, then this:
{%- include machines/command.html type='button' label='Try It!' machine='vt100' component='Keyboard' command='scriptName' -%}
should generate something like this:
{%- endcomment -%}
{%- if page.machineScripts[include.command] != nil -%}{%- assign machine_command = "script" -%}{%- capture command_value -%}{{ page.machineScripts[include.command] | replace:'"','"' | strip }}{%- endcapture -%}{%- else -%}{%- capture machine_command -%}{{ include.command }}{%- endcapture -%}{%- capture command_value -%}{{ include.value | replace:'"','"' }}{%- endcapture -%}{%- endif -%}{%- if include.type == "clickOnce" -%}{%- assign control_type = "button" -%}{%- assign control_single = "true" -%}{%- elsif include.type == "button" -%}{%- assign control_type = "button" -%}{%- assign control_single = "false" -%}{%- else -%}{%- assign control_type = "unknown" -%}{%- assign control_single = "false" -%}{%- endif -%}{%- if control_type == "button" -%}{%- else -%}{%- endif -%}