Commit a10ae6b4 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

find Products

parent 716016c9
...@@ -38,15 +38,15 @@ def main(argv): ...@@ -38,15 +38,15 @@ def main(argv):
# with contextlib.redirect_stdout(None): # with contextlib.redirect_stdout(None):
productList = findSentinelProducts(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]) productList = findSentinelProducts(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5])
fileNames = [productList[k]['filename'].replace("SAFE", "zip").replace("L1C", "L2AA") for k in productList.keys() ] fileNames = [productList[k]['filename'].replace("SAFE", "zip").replace("L1C", "L2A") for k in productList.keys() ]
# print(fileNames) # print(fileNames)
inDir = sys.argv[6] inDir = sys.argv[6]
outdir = sys.argv[7] outdir = sys.argv[7]
dirList = os.listdir(inDir) dirList = os.listdir(inDir)
matchingProducts = set(fileNames).intersection(set(fileNames)) matchingProducts = set(fileNames).intersection(set(dirList))
print ( str(len(matchingProducts))+" of " + str(len(productList)) +" products found.") print ( str(len(matchingProducts))+" of " + str(len(fileNames)) +" products found.")
for f in matchingProducts: for f in matchingProducts:
......
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