From 45855c051f415e56306f116a921eefe284139694 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 7 Jan 2020 18:18:38 +0100 Subject: fetch list of images and dedupe --- cli/app/commands/biggan/fetch.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cli/app/commands/biggan') diff --git a/cli/app/commands/biggan/fetch.py b/cli/app/commands/biggan/fetch.py index 94117c9..39f503c 100644 --- a/cli/app/commands/biggan/fetch.py +++ b/cli/app/commands/biggan/fetch.py @@ -1,6 +1,7 @@ import click +import os -from app.utils.cortex_utils import fetch_cortex_folder +from app.utils.cortex_utils import fetch_cortex_folder, find_unprocessed_files @click.command('') @click.option('-i', '--folder_id', 'opt_folder_id', type=int, @@ -10,4 +11,8 @@ def cli(ctx, opt_folder_id): """ Fetch JSON from the server """ - fetch_cortex_folder(opt_folder_id) + files = fetch_cortex_folder(opt_folder_id) + unprocessed_files = find_unprocessed_files(files) + print("Unprocessed files:") + for file in unprocessed_files: + print(" - {}".format(file['name'])) -- cgit v1.2.3-70-g09d2