Untitled
unknown
plain_text
9 months ago
1.1 kB
15
Indexable
from PIL import Image, ImageDraw, ImageFont
# Create a simple checklist image
width, height = 900, 1100
img = Image.new("RGB", (width, height), "white")
draw = ImageDraw.Draw(img)
title = "Weekly Workout Checklist"
items = [
"Monday: 10 Push-ups + 10 Backpack Rows",
"Tuesday: 12 Squats + 10 Lunges (each leg)",
"Wednesday: 10 Push-ups + 10 Backpack Rows",
"Thursday: Rest + Stretch",
"Friday: 15 Push-ups + 15 Backpack Rows",
"Saturday: Fun Activity (Basketball/Walk/etc.)",
"Sunday: Full Rest"
]
# Load a default font
try:
font_title = ImageFont.truetype("arial.ttf", 50)
font_items = ImageFont.truetype("arial.ttf", 38)
except:
font_title = ImageFont.load_default()
font_items = ImageFont.load_default()
# Draw title
draw.text((50, 50), title, fill="black", font=font_title)
# Draw items with checkboxes
y_offset = 150
for item in items:
draw.rectangle((50, y_offset, 90, y_offset + 40), outline="black", width=3)
draw.text((110, y_offset), item, fill="black", font=font_items)
y_offset += 80
# Save
file_path = "/mnt/data/weekly_workout_checklist.png"
img.save(file_path)
file_pathEditor is loading...
Leave a Comment