Skip to content

Commit

Permalink
Fixing formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Oct 1, 2017
1 parent 56b6fdf commit 916e550
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from PIL import Image


def dummy():
pass

Expand All @@ -14,15 +15,17 @@ def main(args):
os.makedirs(args.output_root)
for recipe_key in os.listdir(args.input_root):
image_path = os.path.join(args.input_root, recipe_key, 'main.jpg')
resized_path = os.path.join(args.output_root, recipe_key + '_thumbnail.jpg')
resized_path = os.path.join(args.output_root,
recipe_key + '_thumbnail.jpg')
image = Image.open(image_path)
image.thumbnail((340, 230))
image.convert('RGB').save(resized_path, "JPEG")


if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='KetoHub Thumbnail Processor',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser = argparse.ArgumentParser(
prog='KetoHub Thumbnail Processor',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-i', '--input_root')
parser.add_argument('-o', '--output_root')
main(parser.parse_args())

0 comments on commit 916e550

Please sign in to comment.