#! /usr/bin/env ruby CHAR_REFS_URL = 'https://dev.w3.org/html5/html-author/charref' refs = `curl -L #{CHAR_REFS_URL}` header = <
header body = "" refs.scan(/ ([^<;]*);\<\/code> U\+([0-9A-F]+) /).sort_by { |match| [Integer("0x"+match[1]), /[[:upper:]]/.match(match[0].chr) ? 1 : 0, match[0].length, match[0]] }.each do | match | body = body + " \n" end footer = <