def sendPreamble(md5, studyName, other=None, withMaps=False): print("Content-Type: text/html") # HTML is following print() # blank line, end of headers if other: name = other elif md5: name = MEGA.getNameFromMD5(md5) else: name = studyName print("<header>") print("<title>%s</title>" % (name,)) if withMaps: print('<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />') print("</header><body>") if withMaps: print('<script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js"></script>') print('<a href="%s/mega.py">Main page</a>' % MEGA.webRoot)
def getRefPop(indivs, karyo, popName=None): md5 = MEGA.getHash(indivs) if not popName: popName = MEGA.getNameFromMD5(md5) return '<a href="%s/pop.py?md5=%s&k=%s">%s</a><br>' % (MEGA.webRoot, md5, karyo, popName)