generate-work at [a0b0b2d10b]

File examples/generate-work/generate-work artifact 5558c50503 part of check-in a0b0b2d10b


#! /usr/bin/env tclsh

package require nano

if {[llength $argv] == 0} {
	puts stderr "Usage: generate-work <hash>..."

	exit 1
}

foreach arg $argv {
	if {[catch {
		set work [::nano::work::fromWorkData $arg]
	} err]} {
		puts stderr "Error generating work for \"$arg\": $err"
	} else {
		puts "WORK($arg) = $work"
	}
}