improve gen_html.py