Update generate.py

I pray that the coding Gods have mercy on me for all the 'html.write('...')'s that I did.