comparison json2iframe.py @ 4:23ead6905145 draft

planemo upload for repository https://github.com/TAMU-CPT/galaxy-webapollo commit 4ac38d0b6dba1183f3e78eb5c224c7051064b4a5-dirty
author eric-rasche
date Thu, 12 Jan 2017 11:53:44 -0500
parents d4ae83dedb14
children 7610987e0c48
comparison
equal deleted inserted replaced
3:d4ae83dedb14 4:23ead6905145
14 # https://fqdn/apollo/annotator/loadLink?loc=NC_005880:0..148317&organism=326&tracks= 14 # https://fqdn/apollo/annotator/loadLink?loc=NC_005880:0..148317&organism=326&tracks=
15 data = json.load(args.json) 15 data = json.load(args.json)
16 16
17 # This is base64 encoded to get past the toolshed's filters. 17 # This is base64 encoded to get past the toolshed's filters.
18 HTML_TPL = """ 18 HTML_TPL = """
19 PGh0bWw+PGhlYWQ+PHRpdGxlPkVtYmVkZGVkIEFwb2xsbyBBY2Nlc3M8L3RpdGxlPjxzdHlsZSB0 19 <html><head><title>Embedded Apollo Access</title><style type="text/css">body {{margin: 0;}} iframe {{border: 0;width: 100%;height: 100%}}</style></head><body><iframe src="{base_url}/annotator/loadLink?loc={chrom}&organism={orgId}&tracklist=1"></iframe></body></html>
20 eXBlPSJ0ZXh0L2NzcyI+Ym9keSB7e21hcmdpbjogMDt9fSBpZnJhbWUge3tib3JkZXI6IDA7d2lk
21 dGg6IDEwMCU7aGVpZ2h0OiAxMDAlfX08L3N0eWxlPjwvaGVhZD48Ym9keT48aWZyYW1lIHNyYz0i
22 e2Jhc2VfdXJsfS9hbm5vdGF0b3IvbG9hZExpbms/bG9jPXtjaHJvbX0mb3JnYW5pc209e29yZ0lk
23 fSZ0cmFja2xpc3Q9MSI+PC9pZnJhbWU+PC9ib2R5PjwvaHRtbD4K
24 """ 20 """
25 HTML_TPL = base64.b64decode(HTML_TPL.replace('\n', '')) 21 # HTML_TPL = base64.b64decode(HTML_TPL.replace('\n', ''))
26 22
27 print HTML_TPL.format(base_url=args.external_apollo_url, chrom="", orgId=data[0]['id']) 23 print HTML_TPL.format(base_url=args.external_apollo_url, chrom="", orgId=data[0]['id'])