mirror of
https://github.com/aljazceru/Image-Quote-Generator.git
synced 2025-12-19 15:04:24 +01:00
add an option to do all the quotes in the file
This commit is contained in:
1
main.py
1
main.py
@@ -8,6 +8,7 @@ project_dir = os.getcwd().replace("\\", "/")
|
|||||||
TOPIC = "christian"
|
TOPIC = "christian"
|
||||||
|
|
||||||
# Define the paths and values to everything
|
# 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
|
number_of_posts = 81
|
||||||
images_folder = f"{project_dir}/sources/images/{TOPIC}"
|
images_folder = f"{project_dir}/sources/images/{TOPIC}"
|
||||||
images_folder_cropped = f"{images_folder}/cropped"
|
images_folder_cropped = f"{images_folder}/cropped"
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ def create_posts(images_folder, text_file, font_dir, output_folder, customer_nam
|
|||||||
# Creating folder for customer
|
# Creating folder for customer
|
||||||
output_path = create_dirs(output_folder, customer_name)
|
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):
|
for i in range(number_of_posts):
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
print(f"Creating Post #{i}")
|
print(f"Creating Post #{i}")
|
||||||
|
|||||||
Reference in New Issue
Block a user