|
|
|
|
@ -25,6 +25,13 @@ def process_pictures():
|
|
|
|
|
Return a dict for each image processed for database collection.
|
|
|
|
|
"""
|
|
|
|
|
# walk every pic
|
|
|
|
|
# We only care about files in the root of the path
|
|
|
|
|
# Ignore any nested directories
|
|
|
|
|
(root, _, filenames) = next(walk(argv[1], topdown=True), (None, None, []))
|
|
|
|
|
for filename in filenames:
|
|
|
|
|
# skip any non-image files
|
|
|
|
|
if not filetype.image_match(path.join(root, filename)):
|
|
|
|
|
continue
|
|
|
|
|
# process it with imagemagick
|
|
|
|
|
# move them to the processed folder
|
|
|
|
|
# update the database
|
|
|
|
|
|