+# Do the app stuff if requested
+if app:
+ # The firt component is the main application component.
+ toplevel = xml_idx(components, 0)
+ name = toplevel.getAttribute("qname")
+ nicename = toplevel.getAttribute("nicename")
+ wiring = xml_tag(xml_tag(dom, "nesc"), "wiring")
+ generate_graph(".", repository, dom, wiring, name, nicename)
+
+ ht = Html("%s.html" % nicename)
+ ht.title("Application: " + nicename)
+ ht.body()
+ ht.push("h2");
+ ht.p("Application: " + nicename)
+ ht.popln();
+ ht.pushln("map", 'name="comp"')
+ cmap = file("%s.cmap" % nicename)
+ for line in cmap.readlines():
+ ht.pln(line)
+ cmap.close()
+ ht.popln()
+ ht.tag("img", 'src="%s.png"' % nicename, 'usemap="#comp"', 'id=imgwiring')
+ ht.close()
+