def html(self, diff, f):
env = Environment(loader=PackageLoader('<STR_LIT>', '<STR_LIT>'))<EOL>template = env.get_template('<STR_LIT>')<EOL>def number_class(v):<EOL><INDENT>if v is None:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if v > <NUM_LIT:0>:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>elif v < <NUM_LIT:0>:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return '<STR_LIT>'<EOL><DEDENT>context = {<EOL>'<STR_LIT>': diff,<EOL>'<STR_LIT>': GLOBAL_ARGUMENTS,<EOL>'<STR_LIT>': format_comma,<EOL>'<STR_LIT>': format_duration,<EOL>'<STR_LIT>': number_class<EOL>}<EOL>f.write(template.render(**context).encode('<STR_LIT:utf-8>'))<EOL>
Generate a text report for a diff.