#!/usr/bin/env bx

cstr section_start="<!-- start: %s -->"
cstr section_end="<!-- end: %s -->"

Main()
	if args != 1
		usage("section-name < in.html > out.html")

	let(which, arg[0])

	let(start, format(section_start, which))
	let(end, format(section_end, which))

	let(in, 0)

	eachline(l)
		if cstr_eq(l, start)
			in = 1
		 eif cstr_eq(l, end)
		 	exit(0)
		 eif in
		 	Say(l)

use b
