diff --git a/main.py b/main.py index 32a3496..b6876cf 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,7 @@ project_dir = os.getcwd().replace("\\", "/") TOPIC = "christian" # Define the paths and values to everything +# If number of posts if set to -1, it will so as many posts as in the data file number_of_posts = 81 images_folder = f"{project_dir}/sources/images/{TOPIC}" images_folder_cropped = f"{images_folder}/cropped" diff --git a/post_handler.py b/post_handler.py index c795bbd..45babb1 100644 --- a/post_handler.py +++ b/post_handler.py @@ -47,6 +47,9 @@ def create_posts(images_folder, text_file, font_dir, output_folder, customer_nam # Creating folder for customer output_path = create_dirs(output_folder, customer_name) + # If number_of_posts is set to -1, it will do it for the amount of quotes there is in the data file + if number_of_posts == -1: + number_of_posts = len(quotes)-1 for i in range(number_of_posts): start_time = time.time() print(f"Creating Post #{i}")