Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<style>
table, th, td {
text-align: left;
padding: 2px;
/* border: 1px solid black;
border-collapse: collapse; */
}
h2 {
line-height: 0pt;
}
</style>
<title>NanoComp Report</title>
"""
html_content = ["\n\n<h1>NanoComp report</h1>"]
html_content.append("<h2>Summary statistics</h2>")
html_content.append(utils.stats2html(path + "NanoStats.txt"))
html_content.append('\n<br>\n<br>\n<br>\n<br>')
html_content.append("<h2>Plots</h2>")
for plot in plots:
html_content.append("\n<h3>" + plot.title + "</h3>\n" + plot.encode())
html_content.append('\n<br>\n<br>\n<br>\n<br>')
html_body = '\n'.join(html_content) + ""
html_str = html_head + html_body
with open(path + "NanoComp-report.html", "w") as html_file:
html_file.write(html_str)
return path + "NanoComp-report.html"