def METHOD_NAME(args):
	args = makeCmdParser();
	if not os.path.exists(args.input):
		print_error("changelog-to-html.py was unable to locate the input file " + args.input)
		sys.exit(1)
	with open(args.input, mode="r", encoding="utf-8") as f:
		text = f.read();
	# remove first line starting with "Here we document changes..."
	if text.startswith(changelogBegin):
		text = text.split('\n', 2)[2]
	url = "https://api.github.com/markdown"
	headers = {
		'Accept': 'application/vnd.github.v3+json', 
		'Content-type' : 'application/json'
	}
	data = json.dumps({'text': text, 'mode' : 'gfm'}).encode("utf-8")
	req = urllib.request.Request(url, data, headers)
	with urllib.request.urlopen(req) as f:
		body = f.read().decode('utf-8')
	html = htmlHeader + body + htmlBody
	(path, filename)  = os.path.split(os.path.abspath(args.output))
	ivwpy.util.mkdir(path)
	with open(args.output, mode="w", encoding="utf-8", errors="xmlcharrefreplace") as f:
		f.write(html)