[
  { "name": "hide", "category": "visibility", "syntax": "<hide>", "description": "Hide all following output until the next show/flipmode.", "example": "<hide>secret<show>" },
  { "name": "show", "category": "visibility", "syntax": "<show>", "description": "Show all following output until the next hide/flipmode." },
  { "name": "flipmode", "category": "visibility", "syntax": "<flipmode>", "description": "Invert the current hide/show state — the NetCloak 'else'." },

  { "name": "show_local", "category": "conditions", "syntax": "<show_local name = \"value\">", "description": "Show the block when local variable `name` matches `value`.", "notes": "chained conditionals AND together until the next hide/show/flipmode" },
  { "name": "hide_local", "category": "conditions", "syntax": "<hide_local name = \"value\">", "description": "Hide the block when local variable `name` matches `value`." },
  { "name": "show_variable", "category": "conditions", "syntax": "<show_variable name = \"value\">", "description": "Show when form/query variable `name` matches `value`.", "notes": "# = numeric, == = list of alternatives, default = contains" },
  { "name": "hide_variable", "category": "conditions", "syntax": "<hide_variable name = \"value\">", "description": "Hide when form/query variable `name` matches `value`." },
  { "name": "show_cookie", "category": "conditions", "syntax": "<show_cookie name = \"value\">", "description": "Show when cookie `name` matches `value`." },
  { "name": "hide_cookie", "category": "conditions", "syntax": "<hide_cookie name = \"value\">", "description": "Hide when cookie `name` matches `value`." },
  { "name": "show_global", "category": "conditions", "syntax": "<show_global name = \"value\">", "description": "Show when global variable `name` matches `value`." },
  { "name": "hide_global", "category": "conditions", "syntax": "<hide_global name = \"value\">", "description": "Hide when global variable `name` matches `value`." },
  { "name": "show_client", "category": "conditions", "syntax": "<show_client \"WebTV\">", "description": "Show when the visitor's user-agent matches the given client string.", "example": "<hide><show_client \"WebTV\">WebTV layout<hide>" },
  { "name": "hide_client", "category": "conditions", "syntax": "<hide_client \"WebTV\">", "description": "Hide when the user-agent matches the given client string." },
  { "name": "show_host", "category": "conditions", "syntax": "<show_host \"1.2.3.\">", "description": "Show when the requesting host/IP matches." },
  { "name": "hide_host", "category": "conditions", "syntax": "<hide_host \"1.2.3.\">", "description": "Hide when the requesting host/IP matches." },
  { "name": "show_domain", "category": "conditions", "syntax": "<show_domain \".edu\">", "description": "Show when the requesting domain matches." },
  { "name": "hide_domain", "category": "conditions", "syntax": "<hide_domain \".edu\">", "description": "Hide when the requesting domain matches." },
  { "name": "show_thisurl", "category": "conditions", "syntax": "<show_thisurl \"/play\">", "description": "Show when the current request URL matches." },
  { "name": "hide_thisurl", "category": "conditions", "syntax": "<hide_thisurl \"/play\">", "description": "Hide when the current request URL matches." },
  { "name": "show_header", "category": "conditions", "syntax": "<show_header \"Referer: ...\">", "description": "Show when a raw request header matches." },

  { "name": "show_random", "category": "random", "syntax": "<show_random threshold [range]>", "description": "Pick a random number in 1..range (default 100) and show when it is ≤ threshold.", "notes": "great for rotating ads/banners" },
  { "name": "hide_random", "category": "random", "syntax": "<hide_random threshold [range]>", "description": "As show_random, inverted." },
  { "name": "show_samerand", "category": "random", "syntax": "<show_samerand weight>", "description": "Reuse the current random draw to choose one weighted block among several (the weights accumulate).", "notes": "weighted one-of-N selection" },
  { "name": "hide_samerand", "category": "random", "syntax": "<hide_samerand weight>", "description": "As show_samerand, inverted." },

  { "name": "set_local", "category": "set", "syntax": "<set_local name = \"value\">", "description": "Set a request-scoped local variable.", "example": "<set_local skin = \"itunes\">" },
  { "name": "set_variable", "category": "set", "syntax": "<set_variable name = \"value\">", "description": "Set a variable in the form/query scope." },
  { "name": "set_cookie", "category": "set", "syntax": "<set_cookie name = \"value\">", "description": "Set a cookie on the response." },
  { "name": "set_global", "category": "set", "syntax": "<set_global name = \"value\">", "description": "Set a server-global variable." },

  { "name": "insert_local", "category": "insert", "syntax": "<insert_local name>", "description": "Output the value of a local variable.", "example": "[<insert_local skin>]" },
  { "name": "insert_variable", "category": "insert", "syntax": "<insert_variable name>", "description": "Output the value of a form/query variable.", "example": "Hi <insert_variable firstname>" },
  { "name": "insert_cookie", "category": "insert", "syntax": "<insert_cookie name>", "description": "Output the value of a cookie." },
  { "name": "insert_date", "category": "insert", "syntax": "<insert_date [year|month|day]>", "description": "Output the server date (or a component, e.g. the 2-digit year)." },
  { "name": "insert_time", "category": "insert", "syntax": "<insert_time>", "description": "Output the server time." },
  { "name": "insert_modified", "category": "insert", "syntax": "<insert_modified>", "description": "Output the file's last-modified date." },
  { "name": "insert_count", "category": "insert", "syntax": "<insert_count [name]>", "description": "Output (and increment) a hit counter." },
  { "name": "insert_domain", "category": "insert", "syntax": "<insert_domain>", "description": "Output the requesting domain." },
  { "name": "insert_thisurl", "category": "insert", "syntax": "<insert_thisurl>", "description": "Output the current request URL." },
  { "name": "insert_referer", "category": "insert", "syntax": "<insert_referer>", "description": "Output the Referer header." },
  { "name": "insert_host", "category": "insert", "syntax": "<insert_host>", "description": "Output the requesting host/IP." },
  { "name": "insert_header", "category": "insert", "syntax": "<insert_header \"Name\">", "description": "Output a raw request header." },
  { "name": "insert_random", "category": "insert", "syntax": "<insert_random range>", "description": "Output a fresh random number in 1..range." },
  { "name": "insert_samerand", "category": "insert", "syntax": "<insert_samerand>", "description": "Output the current (reused) random draw." },

  { "name": "macro", "category": "flow", "syntax": "<macro /path.macro>", "description": "Server-side include: insert and process another template fragment.", "example": "<macro /header.macro>", "notes": "handled by the macroLoader closure" },
  { "name": "redirect", "category": "flow", "syntax": "<redirect \"url\">", "description": "Stop processing and send an HTTP redirect to url." },
  { "name": "exec_cgi", "category": "flow", "syntax": "<exec_cgi app.acgi command>", "description": "Call an external (A)CGI and insert its output — the bridge to the HyperCard game engine.", "notes": "handled by the acgiDispatch closure" },

  { "name": "variable_list", "category": "list", "syntax": "<variable_list>...<varname><varvalue>...", "description": "Iterate over all variables, exposing each via varname/varvalue." },
  { "name": "varname", "category": "list", "syntax": "<varname>", "description": "Inside variable_list: output the current variable's name." },
  { "name": "varvalue", "category": "list", "syntax": "<varvalue>", "description": "Inside variable_list: output the current variable's value." },

  { "name": "mail", "category": "integration", "syntax": "<mail to ... subject ...>...</mail>", "description": "Queue an email via the server's NetCloak mail integration." },
  { "name": "firesite", "category": "integration", "syntax": "<firesite ...>", "description": "Clearway FireSite hook (geo-mirroring of multimedia assets) used by the Euregio.Net network." },
  { "name": "audioscope", "category": "integration", "syntax": "<audioscope ...>", "description": "GuruHits-era audio-player selection hook for the 5-second clips." }
]
