

def __init__(self, resource, html_header=True, html_footer=None, write_headers=True, table_attributes=None):
    'Creates a HTML data target with simple naive HTML generation. No package that generates\n        document node tree is used, just plain string concatenation.\n        \n        :Attributes:\n            * resource: target object - might be a filename or file-like object - you can stream\n              HTML table data into existing opened file.\n            * write_headers: create table headers, default: True. Field labels will be used,\n              if field has no label, then fieln name will be used.\n            * table_attributes: <table> node attributes such as ``class``, ``id``, ...\n            * html_header: string to be used as HTML header. If set to ``None`` only <table> will\n              be generated. If set to ``True`` then default header is used. Default is ``True``.\n            * html_header: string to be used as HTML footer. Works in similar way as to html_header.\n\n        Note: No HTML escaping is done. HTML tags in data might break the output.\n        '
    self.resource = resource
    self.write_headers = write_headers
    self.table_attributes = table_attributes
    if (html_header == True):
        self.html_header = '\n            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n            <html>\n            <head>\n            <meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n            </head>\n            <body>\n            '
    elif (html_header and (html_header != True)):
        self.html_header = html_header
    else:
        self.html_header = ''
    if (html_footer == True):
        self.html_footer = '\n            </body>'
    elif (html_footer and (html_footer != True)):
        self.html_footer = html_footer
    else:
        self.html_footer = ''

dataset/ETHPy150Open Stiivi/brewery/brewery/ds/html_target.py SimpleHTMLDataTarget.__init__/original