fheroes3/test-html.py
2014-06-21 14:41:07 +02:00

13 lines
405 B
Python

file = open("test2")
objects = [[] for i in range(255)]
for line in file:
objclass, obj = line.split()
objects[int(objclass)].append(obj)
file = open("test.html", "w")
for i, objs in enumerate(objects):
if len(objs) == 0:
continue
file.write("<h1>class %d</h1>\n"%i)
for obj in objs:
file.write("<img src=\"data/advmap_objects/%s/0.png\" title=\"%s\"/>\n"%(obj, obj))