Commit 0d46a86e authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

find Products

parent 2febef4e
...@@ -31,15 +31,19 @@ def findSentinelProducts(wkt, startDate, endDate, platform, cloud): ...@@ -31,15 +31,19 @@ def findSentinelProducts(wkt, startDate, endDate, platform, cloud):
def main(argv): def main(argv):
if len(sys.argv) != 6: if len(sys.argv) != 7:
print("Usage") print("Usage: " + argv[0] + "<WKT Polygon> <Start Date> <End Date> <Platform> <Maximum Cloud %> <Destination>")
else: else:
# with suppress_stdout(): # with suppress_stdout():
# with contextlib.redirect_stdout(None): # with contextlib.redirect_stdout(None):
list = findSentinelProducts(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]) list = findSentinelProducts(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5])
# for l in list: for l in list:
# print(l) print(l['filename'])
print(json.dumps(list)) print(json.dumps(list))
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)
#cat results2.txt | xargs -I{} ln -s {} ~/newlinks
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment