From cdea4b652c558f8ca1eeed5ac91d65a30bb2d2cf Mon Sep 17 00:00:00 2001 From: Steve Dogiakos Date: Tue, 6 Dec 2022 16:50:53 -0700 Subject: [PATCH] File name fix, notes, ask for unit Made it so output filename is cleaner. Added Unit Type prompt. Made notes about future work. --- ChatCPG_version.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChatCPG_version.py b/ChatCPG_version.py index 7284a52..19b9885 100644 --- a/ChatCPG_version.py +++ b/ChatCPG_version.py @@ -3,12 +3,15 @@ import os from PIL import Image # Define the input value +unit_type = input("Enter the unit type:Troop, Pack, or Crew") unit_number = input("Enter your unit number") # Create an empty list to store the images images = [] # Loop through each digit in the input value +# TO-DO: Move the pack images into folder Pack, and get similar images for Troop/Crew and put them in their respective folders. +# Then, have the program open folder (unit_type) and find (unit_number.jpg) for digit in str(unit_number): # Load the image from the file image = Image.open(f"{digit}.jpg") @@ -25,4 +28,4 @@ for img in images: x_offset += img.width # Save the final result -result_image.save("str(unit_number).jpg") \ No newline at end of file +result_image.save(f"{unit_type} {unit_number}.jpg") \ No newline at end of file