def main(ctx):
    which = "where" if sys.platform == "win32" else "which"
    if envoy.run(which + " git").status_code != 0:
        click.secho("fatal: git not found in PATH", fg="red")
        sys.exit(1)
    ctx.obj = Hydrogen()
def image_thumbnail(filename):
    filepath = os.path.join(app.config.get('UPLOAD_FOLDER'), filename)
    im = Image.open(filepath)
    w, h = im.size

    if w > h:
        im.thumbnail((106, 106*h/w))
    else:
        im.thumbnail((106*w/h, 106))

    im.save(os.path.join(app.config.get('UPLOAD_FOLDER'), 
        os.path.splitext(filename)[0] + '_thumbnail' + os.path.splitext(filename)[1]))