def test(): util._mkdir("../results") f = open("../results/hash2compound.txt", "w") for (h, compound) in map_hash2compound.iteritems(): f.write("compound = %s\n" % compound) f.write("hash = %s\n" % h) f.write("$$$$\n") f.close() import html_writer compound_list = sorted(map_compound2graph.keys()) util._mkdir("../results/svg") html_writer = html_writer.HtmlWriter("../results/compounds.html") html_writer.write("<h1><center>Known Compounds</h1></center>") for i in range(len(compound_list)): G = map_compound2graph[compound_list[i].upper()] scene = G.svg(svg.Scene(300, 300, 10)) scene.add(svg.Text((30, 10), compound_list[i], 10, fill_color=magenta)) html_writer.write_svg(scene, "svg/%s" % G.hash()) html_writer.display()
def main2(): util._mkdir("../results") f = open("../results/hash2compound.txt", "w") for (h, compound) in map_hash2compound.iteritems(): f.write("compound = %s\n" % compound) f.write("hash = %s\n" % h) f.write("$$$$\n") f.close() import html_writer compound_list = sorted(map_compound2graph.keys()) util._mkdir("../results/svg") html_writer = html_writer.HtmlWriter("../results/compounds.html") html_writer.write("<h1><center>Known Compounds</h1></center>") for i in range(len(compound_list)): G = map_compound2graph[compound_list[i].upper()] scene = G.svg(svg.Scene(300, 300, 10)) scene.add(svg.Text((30, 10), compound_list[i], 10, fill_color=magenta)) html_writer.write_svg(scene, "svg/%s" % G.hash()) html_writer.display()
def html(output_file_name): """Outputs a readable html page.""" report = load_report('.orphanblack') html_writer.write(report, output_file_name)