MCPcopy
hub / github.com/richzhang/PerceptualSimilarity / add_images

Method add_images

util/html.py:35–45  ·  view source on GitHub ↗
(self, ims, txts, links, width=400)

Source from the content-addressed store, hash-verified

33 self.doc.add(self.t)
34
35 def add_images(self, ims, txts, links, width=400):
36 self.add_table()
37 with self.t:
38 with tr():
39 for im, txt, link in zip(ims, txts, links):
40 with td(style="word-wrap: break-word;", halign="center", valign="top"):
41 with p():
42 with a(href=os.path.join(link)):
43 img(style="width:%dpx" % width, src=os.path.join(im))
44 br()
45 p(txt)
46
47 def save(self,file='index'):
48 html_file = '%s/%s.html' % (self.web_dir,file)

Callers 4

html.pyFile · 0.80
save_images_simpleMethod · 0.80
save_imagesMethod · 0.80

Calls 1

add_tableMethod · 0.95

Tested by

no test coverage detected