summaryrefslogtreecommitdiff
path: root/check/commands/imagehash/load.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-04-14 19:52:16 +0200
committerJules Laplace <julescarbon@gmail.com>2019-04-14 19:52:16 +0200
commit61f169d109c9ba1c01ada06d830973c873d4e634 (patch)
tree8ec603eaa0e10332367fc9c4bef085db2b18c06a /check/commands/imagehash/load.py
parent0a4b3ea4611fcbe66b148041f82e77a0f138e688 (diff)
record format
Diffstat (limited to 'check/commands/imagehash/load.py')
-rw-r--r--check/commands/imagehash/load.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/check/commands/imagehash/load.py b/check/commands/imagehash/load.py
index bdcb19c..dbb2567 100644
--- a/check/commands/imagehash/load.py
+++ b/check/commands/imagehash/load.py
@@ -1,3 +1,22 @@
-# loop over a directory of images
-# - compute their phashes
-# - optionally upload them to s3?
+"""
+Loop over a directory of images
+ - Compute their phashes
+ - Optionally upload them to s3?
+"""
+
+import click
+
+# from app.models.sql_factory import load_sql_datasets
+
+@click.command()
+@click.option('-i', '--input', 'opt_dir_fn',
+ required=True,
+ help="File to add (gif/jpg/png)")
+@click.option('-u', '--upload', 'opt_upload', is_flag=True,
+ help='Whether to upload this file to S3')
+@click.pass_context
+def cli(ctx, opt_dir_fn, opt_store):
+ """
+ Add a directory of images
+ """
+ print('Adding a directory...')