diff xenaGetDataset.py @ 41:02b0824c7d60

Download data from any hub in the federated xena platform
author jingchunzhu <jingchunzhu@gmail.com>
date Mon, 27 Jul 2015 10:05:22 -0700
parents 8bb037f88ed2
children 3167c1a26101
line wrap: on
line diff
--- a/xenaGetDataset.py	Mon Jul 27 00:59:02 2015 -0700
+++ b/xenaGetDataset.py	Mon Jul 27 10:05:22 2015 -0700
@@ -9,7 +9,7 @@
     parser = argparse.ArgumentParser()
     parser.add_argument("dataHub", type=str)
     parser.add_argument("datasetId", type=str)
-    parser.add_argument("metadatafile", type=str)
+    #parser.add_argument("metadatafile", type=str)
     parser.add_argument("datafile", type=str)
     args = parser.parse_args()
 
@@ -17,11 +17,13 @@
     datasetIdTokens = re.split("/", args.datasetId)
     datasetUrl = datasetUrlHost + "/" + "/".join(datasetIdTokens[1:])
     print datasetUrl
+    """
     metadataUrl = datasetUrl + ".json"
     mm = urllib2.urlopen(metadataUrl)
     with open(args.metadatafile, "w") as metadata:
         metadata.write(mm.read())
     mm.close()
+    """
     dd = urllib2.urlopen(datasetUrl)
     with open(args.datafile, "w") as data:
         data.write(dd.read())