120 |
htmlfile.close() |
htmlfile.close() |
121 |
|
|
122 |
insert = html.find('<a id="'+diagram+'_implicit">') |
insert = html.find('<a id="'+diagram+'_implicit">') |
123 |
if insert == -1: |
|
124 |
|
"""If explicit diagram found, will not insert implicit on.""" |
125 |
|
explicit = html.find('<a id="'+diagram+'">') |
126 |
|
if explicit == -1: explicit = html.find('_uml="'+diagram) |
127 |
|
|
128 |
|
if insert == -1 and explicit == -1: |
129 |
""" |
""" |
130 |
Implicit imagemaps are embedded after the first header or after |
Implicit imagemaps are embedded after the first header or after |
131 |
the <body> tag. |
the <body> tag. |
139 |
insert_left = insert |
insert_left = insert |
140 |
else: insert_left = html.find('/>', html.find('<img', insert))+2 |
else: insert_left = html.find('/>', html.find('<img', insert))+2 |
141 |
|
|
142 |
if insert != -1: |
if insert != -1 and explicit == -1: |
143 |
context = filepath.replace("/","_") |
context = filepath.replace("/","_") |
144 |
if context.endswith(".gen.html"): context = context[0:len(context)-9] |
if context.endswith(".gen.html"): context = context[0:len(context)-9] |
145 |
if context.endswith(".html"): context = context[0:len(context)-5] |
if context.endswith(".html"): context = context[0:len(context)-5] |
146 |
|
context = context+'_implicit' |
147 |
|
|
148 |
|
create_uml(diagram, context, scale=0.5) |
149 |
out = open(filepath, "w") |
out = open(filepath, "w") |
150 |
out.write(html[0:insert]); |
out.write(html[0:insert]); |
151 |
out.close() |
out.close() |
152 |
out = open(filepath, "w") |
out = open(filepath, "w") |
153 |
out.write(html[0:insert]); |
out.write(html[0:insert]); |
|
create_uml(diagram, context, scale=0.5) |
|
154 |
dbg("Mapping diagram %s within %s" % (diagram, filepath)) |
dbg("Mapping diagram %s within %s" % (diagram, filepath)) |
155 |
imgmap = get_imagemap(diagram, context, scale=0.5, id_postfix="_implicit") |
imgmap = get_imagemap(diagram, context, scale=0.5, id_postfix="_implicit") |
156 |
dbg("Diagram %s imagemap: %s" % (diagram, "\n"+str(imgmap))) |
dbg("Diagram %s imagemap: %s" % (diagram, "\n"+str(imgmap))) |