comparison contrib/python/generateHTML.py @ 221:a44d442577ca

Fixes correct paths for Browser-output, added target for GROUP-output
author Stephan Holl <stephan.holl@intevation.de>
date Mon, 25 Jul 2011 12:33:24 +0200
parents 13f1cf17f620
children 316a2b3d4126
comparison
equal deleted inserted replaced
218:fb1ffd385115 221:a44d442577ca
44 def writeLayers(mapfile, layers, extent): 44 def writeLayers(mapfile, layers, extent):
45 basename = os.path.basename(mapfile) 45 basename = os.path.basename(mapfile)
46 png = mapfile.replace(".map", "_arcpy.png") 46 png = mapfile.replace(".map", "_arcpy.png")
47 print '''<li>Layer: <strong>%s</strong></li> 47 print '''<li>Layer: <strong>%s</strong></li>
48 <br> 48 <br>
49 <a target="bild" href="%s"><img witdth="80" height="60" border="" src="%s"></a> 49 <a target="bild" href="file://%s"><img witdth="80" height="60" border="" src="file://%s"></a>
50 Anzahl der Layer: %s 50 Anzahl der Layer: %s
51 ''' % (basename, png, png, len(layers)) 51 ''' % (basename, png, png, len(layers))
52 i = 0 52 i = 0
53 print "<ul>" 53 print "<ul>"
54 while i < len(layers): 54 while i < len(layers):
84 i = 0 84 i = 0
85 print "<ul>" 85 print "<ul>"
86 while i < len(groups): 86 while i < len(groups):
87 urlmapfile = url + '?map=' + mapfile 87 urlmapfile = url + '?map=' + mapfile
88 urlmapfile += '&template=openlayers&mode=browse&layers=' + groups[i] 88 urlmapfile += '&template=openlayers&mode=browse&layers=' + groups[i]
89 print "<li><a href='%s'>%s</a></li>" % (urlmapfile, groups[i]) 89 print "<li><a target='_group' href='%s'>%s</a></li>" % (urlmapfile, groups[i])
90 i=i+1 90 i=i+1
91 print "</ul>" 91 print "</ul>"
92 92
93 def main(): 93 def main():
94 writeHeader() 94 writeHeader()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)