.@ Tony Finch – blog

Edited to add: IANA have a tool written in Python called anchors2keys which does most of this automatically (er, for the ITAR not the root anchor). Jakob Schlyter has a Perl program called ta-tool which does a similar job. So does Bjørn Mork, who called his rootanchor2keys.pl. Stephane Bortzmeyer has a Makefile and XSLT script which also does the job.