Mercurial > repos > stephenshank > the_observable_galaxy
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1c2fae461adc |
|---|---|
| 1 import sys | |
| 2 import json | |
| 3 | |
| 4 | |
| 5 observable = {} | |
| 6 observable['notebook'] = sys.argv[1] | |
| 7 observable['history_id'] = sys.argv[2] | |
| 8 output_filename = sys.argv[3] | |
| 9 observable['payload_id'] = sys.argv[4] | |
| 10 | |
| 11 keys = sys.argv[5::2] | |
| 12 vals = sys.argv[6::2] | |
| 13 for key, val in zip(keys, vals): | |
| 14 observable[key] = val | |
| 15 | |
| 16 print(', '.join(sys.argv)) | |
| 17 with open(output_filename, 'w') as outfile: | |
| 18 json.dump(observable, outfile, indent=2) |
