コード例 #1
0
ファイル: genABcommHTML.py プロジェクト: basilveerman/carex
def genHeader(wsid, wsNameDict, wsidDict, totalRankTable, popDict):
    imgref = '../abcommcharts/' + wsid + '.png'
    header = '''<div id="header">\n\
		<img src="http://web.uvic.ca/~carex/files/logo_vert.png" alt="Logo"\
        width="100" height="100" class="logo" />\n\
        <div id="info">\n\
        <p class="tw-b"><span class="txt16pt"><br>{name}</span><br>\n\
        Reported Population within 25km: <span class="txt14pt">{pop}</span><br />\n\
        <a href="{wsid}_summary.pdf" target="_blank">PDF Summary Report</a>\n\
        </p>\n\
        </div>\n\
	</div>\n'''.format(name = unidecode(wsNameDict[wsid]),
                           pop = insert_thousands_separator(int(popDict[wsid])),
                           wsid = wsid,
                           chart = imgref)

    return header
コード例 #2
0
ファイル: genWshedHTML.py プロジェクト: basilveerman/carex
def genHeader(wsid, wsNameDict, wsidDict, totalRankTable, popDict):
    imgref = '../wscharts/' + wsid + '.png'
    header = '''<div id="header">\n\
	<img src="http://web.uvic.ca/~carex/files/logo_vert.png" alt="Logo"\
        width="100" height="100" class="logo" />\n\
        <div id="info">\n\
        <p class="tw-b"><span class="txt16pt" style="margin-bottom:6px">Watershed</span><br>\n\
        ID: {wsid}<br />\n\
        {name}                             <br />\n\
        Reported Population: {pop}<br />\n\
        <a href="{wsid}_summary.pdf" target="_blank">PDF Summary Report</a>\n\
        </p>\n\
        </div>\n\
        <div id="distribution"><img src="{chart}" width="260" height="100" /></div>\n\
	</div>\n'''.format(name = unidecode(wsNameDict[wsid]),
                           pop = insert_thousands_separator(int(popDict[wsid])),
                           wsid = wsid,
                           chart = imgref)
    return header