blob: e61b75107d1073380a8c4c8c8a6bb4948bd43899 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
"""
Loop over a directory of images
- Compute their phashes
- Optionally upload them to s3?
"""
import click
from app.models.sql_factory import search_by_phash, add_phash
@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...')
|