Last active
November 18, 2019 17:16
-
-
Save carzacc/e1ce37a34c8b0c5ded3e3203c728264b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import actions | |
| parser = argparse.ArgumentParser( | |
| description="Improve the way you look at your picture collection with this simple CLI tool" | |
| ) | |
| subparsers = parser.add_subparsers() | |
| generate = subparser.add_parser("generate", help="Generate the pictures") | |
| generate.add_argument("dir", type=str, help="The directory where the tree of input picture starts") | |
| generate.add_argument("save_dir", type=str, help="The directory where to save the output pictures") | |
| generate.set_defaults(func=actions.process_dir) | |
| copy = subparser.add_parser("copy", help="Copy the pictures to the output path without adding text") | |
| copy.add_argument("dir", type=str, help="The directory where the tree of input picture starts") | |
| copy.add_argument("save_dir", type=str, help="The directory where to save the output pictures") | |
| copy.set_defaults(func=actions.copy) | |
| args = parser.parse_args() | |
| args.func(args) # Call the function requested by the user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment