Mercurial > repos > eric-rasche > apollo
diff json2iframe.py @ 5:7610987e0c48 draft
planemo upload for repository https://github.com/TAMU-CPT/galaxy-webapollo commit 29795b77c0d5c7894219b018a92c5ee7818096c3
author | eric-rasche |
---|---|
date | Wed, 01 Mar 2017 22:39:58 -0500 |
parents | 23ead6905145 |
children | f9a6e151b3b4 |
line wrap: on
line diff
--- a/json2iframe.py Thu Jan 12 11:53:44 2017 -0500 +++ b/json2iframe.py Wed Mar 01 22:39:58 2017 -0500 @@ -6,7 +6,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description='Sample script to add an attribute to a feature via web services') parser.add_argument('apollo', help='Complete Apollo URL') - parser.add_argument('json', type=file, help='JSON Data') + parser.add_argument('json', type=argparse.FileType("r"), help='JSON Data') parser.add_argument('external_apollo_url') args = parser.parse_args() @@ -16,7 +16,15 @@ # This is base64 encoded to get past the toolshed's filters. HTML_TPL = """ -<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> + <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> """ # HTML_TPL = base64.b64decode(HTML_TPL.replace('\n', ''))