Mercurial > repos > devteam > data_manager_build_kraken_database
diff data_manager/make_json.py @ 5:6f0294046f41 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kraken_database/ commit 8652f36a3a3838dca989426961561e81432acf4f
author | iuc |
---|---|
date | Tue, 04 Apr 2017 17:49:05 -0400 |
parents | d5d803e654dd |
children | 1d616842e1db |
line wrap: on
line diff
--- a/data_manager/make_json.py Tue Jun 14 15:52:00 2016 -0400 +++ b/data_manager/make_json.py Tue Apr 04 17:49:05 2017 -0400 @@ -1,13 +1,8 @@ +import argparse import json -import argparse import os import shutil -parser = argparse.ArgumentParser(description='Create data manager json.') -parser.add_argument('--db', dest='database', action='store', help='Database name') -parser.add_argument('--out', dest='output', action='store', help='JSON filename') - -args = parser.parse_args() def main(args): data_manager_entry = {} @@ -23,6 +18,10 @@ shutil.move(os.path.join(output_path, filename), target_directory) file(args.output, 'w').write(json.dumps(data_manager_json)) + if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Create data manager json.') + parser.add_argument('--db', dest='database', action='store', help='Database name') + parser.add_argument('--out', dest='output', action='store', help='JSON filename') + args = parser.parse_args() main(args) -