Mercurial > repos > stephenshank > the_observable_galaxy
view observable.py @ 0:1c2fae461adc draft default tip
"planemo upload for repository https://github.com/stephenshank/the_observable_galaxy"
author | stephenshank |
---|---|
date | Fri, 15 Jul 2022 10:27:44 +0000 |
parents | |
children |
line wrap: on
line source
import sys import json observable = {} observable['notebook'] = sys.argv[1] observable['history_id'] = sys.argv[2] output_filename = sys.argv[3] observable['payload_id'] = sys.argv[4] keys = sys.argv[5::2] vals = sys.argv[6::2] for key, val in zip(keys, vals): observable[key] = val print(', '.join(sys.argv)) with open(output_filename, 'w') as outfile: json.dump(observable, outfile, indent=2)