add author display - NEED TO FIND GOOD TEXT

This commit is contained in:
Samuel Lazareanu
2023-04-19 19:08:48 +03:00
parent 18b2c1784c
commit e46d55e723
2 changed files with 30 additions and 13 deletions

13
main.py
View File

@@ -2,14 +2,14 @@ import os
import post_handler
import helper
project_dir = os.getcwd().replace("\\", "/")
# Available topics: christian, fitness
TOPIC = "christian"
TOPIC = "fitness"
SHOW_AUTHOR = True
CUSTOMER_NAME = "test_author"
NUM_OF_POSTS = 3 # If number of posts if set to -1, it will so as many posts as in the data file
# 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
project_dir = os.getcwd().replace("\\", "/")
images_folder = f"{project_dir}/sources/images/{TOPIC}"
images_folder_cropped = f"{images_folder}/cropped"
images_folder_cropped_darken = f"{images_folder_cropped}/darken"
@@ -17,7 +17,6 @@ text_file = f"{project_dir}/sources/text_data/{TOPIC}.txt"
font_dir = "C:/Users/samla/AppData/Local/Microsoft/Windows/Fonts/MouldyCheeseRegular-WyMWG.ttf"
output_folder = f"{project_dir}/customers/{TOPIC}"
logo_file = f"{project_dir}/sources/logo.png"
customer_name = "everythingod"
if __name__ == "__main__":
@@ -29,7 +28,7 @@ if __name__ == "__main__":
# LOGO
post_handler.create_posts(images_folder=images_folder_cropped_darken, text_file=text_file,
font_dir=font_dir, output_folder=output_folder,
logo_file=logo_file, customer_name=customer_name, number_of_posts=number_of_posts)
logo_file=logo_file, customer_name=CUSTOMER_NAME, number_of_posts=NUM_OF_POSTS, show_author=SHOW_AUTHOR)
# NO LOGO
# post_handler.create_posts(images_folder=images_folder_cropped_darken, text_file=text_file,