view jb2_urlconf.py @ 69:7230a2422507 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2c7d6c19a42c421de987ebfdf927c64062ebd79f-dirty
author fubar
date Fri, 29 Mar 2024 09:14:59 +0000
parents 94264fe60478
children
line wrap: on
line source

inconf = open("config.json", "r").readlines()
with open("config.json.local", "w") as bak:
    bak.write("".join(inconf))
urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/"
utag = '"uri":'
for i, row in enumerate(inconf):
    ispath = False
    if row.strip().startswith(utag):
        ispath = True
        parth = row.split(utag)[1].strip().replace('"', "").replace("'", "")
        inconf[i] = '%s "%s%s"' % (utag, urlbase, parth)
with open("config.json", "w") as outconf:
    outconf.write("".join(inconf))