From e8561cbb1f0b80a141807315a80ddc5e6c2e8ba2 Mon Sep 17 00:00:00 2001 From: mmattmcw Date: Tue, 9 Jan 2024 14:32:14 -0500 Subject: [PATCH] Update --help in apply_image --- fourcell/apply_image.py | 21 ++++++++++++++------- fourcell/apply_svg.py | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 fourcell/apply_svg.py diff --git a/fourcell/apply_image.py b/fourcell/apply_image.py index 313edb2..5ad600f 100644 --- a/fourcell/apply_image.py +++ b/fourcell/apply_image.py @@ -11,6 +11,20 @@ fontConstant = 96 markConstant = 5 linesConstant = 150 +#### +# +# Take 1-4 images and apply them to a rasterized, hole-punched +# page that can be printed and shot. +# +#### + +parser = argparse.ArgumentParser(description='Create a printable rasterized image that can be hole punched and animated.') +parser.add_argument('name', help='Name of project') +parser.add_argument('destination', help='File to output image to') +parser.add_argument('template', help='Template file to use') +parser.add_argument('images', nargs=argparse.REMAINDER, help='Images to place as cells') +args = parser.parse_args() + def generate_text (text, fontSize, rotation) : rgb_color=(255,255,255) color = tuple(reversed(rgb_color)) @@ -183,13 +197,6 @@ def apply_image (args) : ##print(f'Wrote {args.destination}') def main () : - parser = argparse.ArgumentParser(description='Create a printable rasterized image that can be hole punched and animated.') - parser.add_argument('name', help='Name of project') - parser.add_argument('destination', help='File to output image to') - parser.add_argument('template', help='Template file to use') - parser.add_argument('images', nargs=argparse.REMAINDER) - args = parser.parse_args() - apply_image(args) main() \ No newline at end of file diff --git a/fourcell/apply_svg.py b/fourcell/apply_svg.py new file mode 100644 index 0000000..0df1d25 --- /dev/null +++ b/fourcell/apply_svg.py @@ -0,0 +1 @@ +from json import load