|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import re
|
|
|
|
|
import textwrap
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
|
from rich.progress import track
|
|
|
|
@ -31,9 +32,9 @@ def imagemaker(theme, reddit_obj: dict, txtclr, padding=5):
|
|
|
|
|
texts = reddit_obj["thread_post"]
|
|
|
|
|
id = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"])
|
|
|
|
|
|
|
|
|
|
tfont = ImageFont.truetype("fonts\\Roboto-Bold.ttf", 27) # for title
|
|
|
|
|
tfont = ImageFont.truetype(os.path.join("fonts", "Roboto-Bold.ttf"), 27) # for title
|
|
|
|
|
font = ImageFont.truetype(
|
|
|
|
|
"fonts\\Roboto-Regular.ttf", 20
|
|
|
|
|
os.path.join("fonts", "Roboto-Regular.ttf"), 20
|
|
|
|
|
) # for despcription|comments
|
|
|
|
|
size = (500, 176)
|
|
|
|
|
|
|
|
|
|