- #TODO exception on file error
- image = Image.open(argv[0])
- #im_debug.show(image, "original image")
+def main():
+ """Main function of the program."""
+
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('files', metavar='file', nargs='+',
+ help="image to analyse")
+ parser.add_argument('-w', type=int, default=640,
+ help="scale image to the specified width before analysis")
+ parser.add_argument('-m', '--manual', dest='manual_mode', action='store_true',
+ help="manual grid selection")
+ parser.add_argument('-d', '--debug', dest='show_all', action='store_true',
+ help="show every step of the computation")
+ parser.add_argument('-s', '--save', dest='saving', action='store_true',
+ help="save images instead of displaying them")
+ parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
+ help="report progress")
+ args = parser.parse_args()